{"id":19584709,"url":"https://github.com/oracle-samples/knife-oci","last_synced_at":"2025-04-27T11:32:11.650Z","repository":{"id":56880278,"uuid":"93604110","full_name":"oracle-samples/knife-oci","owner":"oracle-samples","description":"Chef Knife Plugin for Oracle Cloud Infrastructure","archived":false,"fork":false,"pushed_at":"2024-05-29T11:06:08.000Z","size":188,"stargazers_count":12,"open_issues_count":4,"forks_count":15,"subscribers_count":39,"default_branch":"master","last_synced_at":"2024-10-31T13:55:18.101Z","etag":null,"topics":["chef","cloud","knife-plugin","oracle-cloud"],"latest_commit_sha":null,"homepage":"https://cloud.oracle.com/cloud-infrastructure","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oracle-samples.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-07T07:11:01.000Z","updated_at":"2024-03-09T06:45:25.000Z","dependencies_parsed_at":"2024-05-29T12:36:39.188Z","dependency_job_id":"f53015a4-eafb-47c2-9ad6-d36ea7622e46","html_url":"https://github.com/oracle-samples/knife-oci","commit_stats":{"total_commits":100,"total_committers":6,"mean_commits":"16.666666666666668","dds":0.55,"last_synced_commit":"1698c9c6d18b8df8e1f3c57dd9274c9b943153b5"},"previous_names":["oracle/knife-oci"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-samples%2Fknife-oci","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-samples%2Fknife-oci/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-samples%2Fknife-oci/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-samples%2Fknife-oci/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oracle-samples","download_url":"https://codeload.github.com/oracle-samples/knife-oci/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224069554,"owners_count":17250454,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chef","cloud","knife-plugin","oracle-cloud"],"created_at":"2024-11-11T07:49:25.684Z","updated_at":"2024-11-11T07:49:26.519Z","avatar_url":"https://github.com/oracle-samples.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chef Knife Plugin for Oracle Cloud Infrastructure\n[![wercker status](https://app.wercker.com/status/82cc98510b6b52b3a37d1212174a1d56/s/master \"wercker status\")](https://app.wercker.com/project/byKey/82cc98510b6b52b3a37d1212174a1d56)\n\n## About\n\nThe knife-oci plugin allows users to interact with Oracle Cloud Infrastructure through [Chef Knife](https://docs.chef.io/knife.html).\n\nThe project is open source and maintained by Oracle Corp. The home page for the project is [here](https://docs.us-phoenix-1.oraclecloud.com/Content/API/SDKDocs/knifeplugin.htm).\n\n**_Breaking Change Notice:_** Information about the recent name change from knife-bmcs to knife-oci can be found [here](docs/rename.md).\n\n## Commands\n\n- Launch an OCI instance and bootstrap it as a Chef node:\n  `knife oci server create`\n- List OCI compartments.\n  `knife oci compartment list`\n- Delete an OCI instance:\n  `knife oci server delete`\n- List OCI instances in a given compartment. **Note:** All instances in the compartment are returned, not only those that are Chef nodes:\n  `knife oci server list`\n- List the images in a compartment:\n  `knife oci image list`\n- List the VCNs in a compartment:\n  `knife oci vcn list`\n- List the subnets in a VCN:\n  `knife oci subnet list`\n- List the shapes that may be used for a particular image type:\n  `knife oci shape list`\n- List the availability domains for your tenancy:\n  `knife oci ad list`\n\n## Installation\n\nInstall from RubyGems with:\n\n    chef gem install knife-oci\n\nOr:\n\n    gem install knife-oci\n\n**Note:** The plugin depends on the OCI Ruby SDK. Information about that SDK can be found [here](https://docs.us-phoenix-1.oraclecloud.com/Content/API/SDKDocs/rubysdk.htm).\n\n## Setup\n\nA config file is required to use Oracle Cloud Infrastructure commands. See the instructions for creating a config file [here](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/sdkconfig.htm).\n\nBy default, the config file will be loaded from ~/.oci/config. Alternate locations can be provided as an argument to each command using `--oci-config-file`, or as an entry in your knife.rb file. You can also specify a profile with `--oci-profile`.\n\n## Setting the Compartment\n\nMost OCI commands require a compartment ID, which will default to the root compartment. If you do not have the correct permissions and you do not specify a different compartment, then you will receive an authorization error.\n\nA compartment ID can be provided with each OCI command using `--compartment-id`, or it can be provided in your knife.rb. If a compartment ID is set in both places, then the ID specified in the command will take precedence.\n\n## Knife.rb values\n\nThe following example shows the available knife.rb settings for the OCI Knife Plugin. All of these are optional.\n\n    knife[:oci_config_file] = '~/.oci/my_alternate_config'\n    knife[:oci_profile] = 'MY_ALTERNATE_PROFILE'\n    knife[:compartment_id] = 'ocid1.compartment.oc1..aaaaaaaalsyenka3grgpvvmqwjshig5abzx3jnbvixxxzx373ehwdj7o5arc'\n\n## Using the Server Create Command\n\nThe following example shows how to launch and bootstrap an Oracle Linux image:\n\n    knife oci server create\n      --availability-domain 'kIdk:PHX-AD-1'\n      --compartment-id 'ocidv1:tenancy:oc1:phx:1460406592660:aaaaaaaab4faofrfkxecohhjuivjq26a13'\n      --image-id 'ocid1.image.oc1.phx.aaaaaaaaqutj4qjxihpl4mboabsa27mrpusygv6gurp47katabcvljmq3puq'\n      --shape 'VM.Standard1.1'\n      --subnet-id 'ocid1.subnet.oc1.phx.aaaaaaaaxlc5cv7ewqr343ms4lvcpxr4lznsf4cbs2565abcm23d3cfebrex'\n      --ssh-authorized-keys-file ~/.keys/instance_keys.pub\n      --display-name myinstance\n      --identity-file ~/.keys/instance_keys\n      --run-list 'recipe[my_cookbook::my_recipe]'\n      --region us-phoenix-1\n\nWhen using the `knife oci server create` command, you must specify a public key using `--ssh-authorized-keys-file` and the corresponding private key using `--identity-file`. For more information, see [Managing Key Pairs on Linux Instances](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/managingkeypairs.htm).\n\nNotes about the `knife oci server create` command:\n\n - All Oracle-provided Linux images are supported. Windows images are not supported at this time.\n - Bootstrapping is done through SSH only, and uses the public IP address.\n - For Ubuntu images, the user is usually 'ubuntu' instead of 'opc'.\n\n## Help\n\nSee the “Questions or Feedback?” section [here](https://docs.us-phoenix-1.oraclecloud.com/Content/API/SDKDocs/knifeplugin.htm).\n\n## Changes\n\nSee [CHANGELOG](/CHANGELOG.md).\n\n## Contributing\n\nThis project welcomes contributions from the community. Before submitting a pull request, please [review our contribution guide](./CONTRIBUTING.md)\n\n## Security\n\nPlease consult the [security guide](./SECURITY.md) for our responsible security vulnerability disclosure process\n\n## Known Issues\n\nYou can find information on any known issues with the SDK [here](https://docs.us-phoenix-1.oraclecloud.com/Content/knownissues.htm) and under the “Issues” tab of this GitHub repository.\n\n## License\n\nCopyright (c) 2017, 2023 Oracle and/or its affiliates. All rights reserved.\n\nThis SDK and sample is dual licensed under the Universal Permissive License 1.0 and the Apache License 2.0.\n\nSee [LICENSE](/LICENSE.txt) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle-samples%2Fknife-oci","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foracle-samples%2Fknife-oci","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle-samples%2Fknife-oci/lists"}