Name: knife-oraclecloud
Owner: Chef Partners
Description: Knife plugin for Oracle Cloud Infrastructure Classic
Created: 2015-10-02 20:41:19.0
Updated: 2018-05-01 17:56:24.0
Pushed: 2018-05-01 17:56:35.0
Size: 59
Language: Ruby
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This is a Knife plugin that will allow you to interact with Oracle Cloud Infrastructure Classic. Please use knife-oci for the newer Oracle Cloud Infrastructure (aka 'OCI').
Add this line to your application's Gemfile:
'knife-oraclecloud'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install knife-oraclecloud
… or, even better, from within ChefDK:
$ chef gem install knife-oraclecloud
In order to communicate with Oracle Cloud, you must specify your user credentials. You can specify them in your knife.rb:
e[:oraclecloud_username] = 'myuser'
e[:oraclecloud_password] = 'mypassword'
e[:oraclecloud_api_url] = 'https://cloud.oracle.com'
e[:oraclecloud_domain] = 'my_identity_domain'
… or you can supply them on the command-line:
e oraclecloud command --oraclecloud-username myuser ...
If you are running a deployment of Oracle Cloud behind your firewall, you need to indicate that the API endpoint is a private cloud endpoint. This is required due to the differences in how the identity domain is used in their public cloud vs. their private cloud.
To indicate you are using a private cloud, set the following in your knife.rb:
e[:oraclecloud_private_cloud] = true
… or simply pass --oraclecloud-private-cloud
on the CLI.
Creates a server (a.k.a. an “instance”) on Oracle Cloud and bootstraps it with Chef.
Common parameters to specify are:
--shape
: Shape of the instance you'd like to create - use knife oraclecloud shape list
to list available shapes--image
: Name of the image to use for your new instance - use knife oraclecloud image list
to list available images--sshkeys
: comma-separated list of Oracle Cloud SSH keys to attach to the instance for login, in the format of “username@domain.io/keyname”--hostname
: hostname to use when creating the instance--public-ip
: optional; whether to configure a public IP for your instance. Valid options are “pool” to use the default pool, or the name of an already-configured IP reservation--label
: optional; text label to attach to your instanceWhile not required when using the Oracle Cloud UI, the API requires any instances that are created to be created via an “orchestration” which allows you to create a preconfigured set of machines and resources and start/stop them together. knife oraclecloud server create
will create a single-instance orchestration in order to complete your request.
ife oraclecloud server create --image /oracle/public/oel_6.6_20GB_x11_RD --shape oc3 --hostname test123 --public-ip pool --ssh-user opc --sshkeys user@domain.io/mysshkey --identity-file /Users/user/.ssh/id_rsa
estration user@domain.io/test123 started - waiting for it to complete...
ent status: starting.............................................................................................
estration started successfully.
estration ID: user@domain.io/test123
ription: test123 by user@domain.io via Knife
us: ready
ance Count: 1
er Label: test123
us: running
name: dad634.compute-usoracle12345.oraclecloud.internal.
ddress: 10.106.13.22
ic IP Addresses: 1.2.3.4
e: /oracle/public/oel_6.6_20GB_x11_RD
e: oc3
estration: user@domain.io/test123
strapping the server by using bootstrap_protocol: ssh and image_os_type: linux
ing for sshd to host (1.2.3.4)...
Lists all the servers currently configured in Oracle Cloud.
ife oraclecloud server list
name Status Shape Image Instance ID Orchestration ID
6f.compute-usoracle12345.oraclecloud.internal. initializing oc3 /oracle/public/oel_6.4_5GB_RD user@domain.io/ui1/0db7f5f2-7bdf-41a1-ba93-5710592c5bcf none
34.compute-usoracle12345.oraclecloud.internal. running oc3 /oracle/public/oel_6.6_20GB_x11_RD user@domain.io/test123/fd3af3da-d0be-4a06-a1f4-e452ab2fe7b4 user@domain.io/test123
Displays additional information about an individual server, such as its IP addresses.
ife oraclecloud server show user@domain.io/test123/fd3af3da-d0be-4a06-a1f4-e452ab2fe7b4
er Label: test123
us: running
name: dad634.compute-usoracle12345.oraclecloud.internal.
ddress: 10.106.13.22
ic IP Addresses: 1.2.3.4
e: /oracle/public/oel_6.6_20GB_x11_RD
e: oc3
estration: user@domain.io/test123
Deletes a server/instance from Oracle Cloud. With this command, you can only delete instances that were not created by an orchestration. If you need to delete an instance created by an orchestration (such as one created via knife oraclecloud server create
), use knife oraclecloud orchestration delete
instead.
If you supply --purge
, the server will also be removed from the Chef Server.
ife oraclecloud server delete user@domain.io/ui1/0db7f5f2-7bdf-41a1-ba93-5710592c5bcf
er Label: ui1
us: running
name: aef06f.compute-usoracle12345.oraclecloud.internal.
ddress: 10.106.13.46
ic IP Addresses: 1.2.3.4
e: /oracle/public/oel_6.4_5GB_RD
e: oc3
estration: none
ou really want to delete this server? (Y/N) Y
ting the instance...
te request complete.
Lists the currently-configured orchestrations.
ife oraclecloud orchestration list
estration ID Description Status Instance Count
@domain.io/test123 test123 by user@domain.io via Knife ready 1
Shows details about the specified orchestration, as well as any instances created by that orchestration.
ife oraclecloud orchestration show user@domain.io/test123
estration Summary
estration ID: user@domain.io/test123
ription: test123 by user@domain.io via Knife
us: ready
ance Count: 1
ance user@domain.io/test123/fd3af3da-d0be-4a06-a1f4-e452ab2fe7b4
er Label: test123
us: running
name: dad634.compute-usoracle12345.oraclecloud.internal.
ddress: 10.106.13.22
ic IP Addresses: 1.2.3.4
e: /oracle/public/oel_6.6_20GB_x11_RD
e: oc3
estration: user@domain.io/test123
Stops and deletes the specified orchestration and any instances created by that orchestration.
ife oraclecloud orchestration delete user@domain.io/test123
estration ID: user@domain.io/test123
ription: test123 by user@domain.io via Knife
us: ready
ance Count: 1
ou really want to delete this orchestration? (Y/N) Y
ping the orchestration and any instances...
ent status: ready.
ent status: stopping.......................
ting the orchestration and any instances...
te request complete.
Lists all the images available in the public catalog.
ife oraclecloud image list
e Name Description
cle/public/oel_6.4_20GB_x11_RD OEL 6.4 20 GB image
cle/public/oel_6.4_5GB_RD OEL 6.4 5 GB image
cle/public/oel_6.6_20GB_x11_RD OEL 6.6 20 GB image
Lists all the shapes (i.e. flavors, sizes) of instances available to you.
ife oraclecloud shape list
e Name CPUs RAM I/O
2.0 15360 200
4.0 30720 400
2.0 7680 200
8.0 61440 600
4.0 15360 400
16.0 122880 800
8.0 30720 600
32.0 245760 1000
16.0 61440 800
32.0 122880 1000
Author:: Chef Partner Engineering (partnereng@chef.io)
Copyright:: Copyright (c) 2015 Chef Software, Inc.
License:: Apache License, Version 2.0
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
We'd love to hear from you if you find this isn't working for you. Please submit a GitHub issue with any problems you encounter.
Additionally, contributions are welcome! If you'd like to send up any fixes or changes:
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)