|
| 1 | + # ___ ____ _ ____ _ _____ |
| 2 | + # / _ \| _ \ / \ / ___| | | ____| |
| 3 | + # | | | | |_) | / _ \| | | | | _| |
| 4 | + # | |_| | _ < / ___ | |___| |___| |___ |
| 5 | + # \___/|_| \_/_/ \_\____|_____|_____| |
| 6 | +*** |
| 7 | +# Terraform provider for Oracle Bare Metal Cloud Services |
| 8 | +Oracle customers now have access to an enterprise class, developer friendly orchestration tool they can use to manage [Oracle Bare Metal Cloud Service](https://cloud.oracle.com/en_US/bare-metal) resources as well as the [Oracle Compute Cloud](https://github.com/oracle/terraform-provider-compute). |
| 9 | + |
| 10 | +This Terraform provider is OSS, available to all OBMCS customers at no charge. |
| 11 | + |
| 12 | +### Coverage |
| 13 | +The Terraform provider provides coverage for the entire BMC API excluding the Load Balancer Service, expected March 1 2017. |
| 14 | + |
| 15 | +## Getting started |
| 16 | +Be sure to read the FAQ and Writing Terraform configurations for OBMCS in [/docs](https://github.com/oracle/terraform-provider-baremetal/tree/master/docs). |
| 17 | + |
| 18 | +### Install Terraform |
| 19 | +https://www.terraform.io/downloads.html |
| 20 | + |
| 21 | +### Download the OBMCS Terraform provider binary |
| 22 | +Find the appropriate binary for [your platform here](https://github.com/oracle/terraform-provider-baremetal/releases), download it. |
| 23 | + |
| 24 | +#### \*nix |
| 25 | +Create `~/.terraformrc` that specifies the path to the `baremetal` provider. |
1 | 26 | ``` |
2 | | -__________ _____ __ .__ |
3 | | -\______ \_____ _______ ____ / \ _____/ |______ | | |
4 | | - | | _/\__ \\_ __ \_/ __ \ / \ / \_/ __ \ __\__ \ | | |
5 | | - | | \ / __ \| | \/\ ___// Y \ ___/| | / __ \| |__ |
6 | | - |______ /(____ /__| \___ >____|__ /\___ >__| (____ /____/ |
7 | | - \/ \/ \/ \/ \/ \/ |
| 27 | +providers { |
| 28 | + baremetal = "<path_to_provider_binary>" |
| 29 | + } |
8 | 30 | ``` |
9 | | -# Oracle BareMetal Terraform Provider  |
10 | 31 |
|
11 | | -This repository contains the Terraform provider for the Oracle Bare Metal Iaas |
| 32 | +#### Windows |
| 33 | +Create `%APPDATA%/terraform.rc` that specifies the path to the `baremetal` provider. |
| 34 | +``` |
| 35 | +providers { |
| 36 | + baremetal = "<path_to_provider_binary>" |
| 37 | + } |
| 38 | +``` |
| 39 | +### Export credentials |
| 40 | +Required Keys and OCIDs - https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm |
12 | 41 |
|
13 | | -## Requirements |
| 42 | +If you primarily work in a single compartment consider exporting that compartment's OCID as well. Remember that the tenancy OCID is also the OCID of the root compartment. |
14 | 43 |
|
15 | | -* Terraform v0.6.16+ |
16 | | -* Oracle Bare Metal credentials (see below) |
| 44 | +#### \*nix |
| 45 | +In your ~/.bash_profile set these variables |
| 46 | +`export TF_VAR_tenancy_ocid=` |
| 47 | +`export TF_VAR_user_ocid=` |
| 48 | +`export TF_VAR_fingerprint=` |
| 49 | +`export TF_VAR_private_key_path=<fully qualified path>` |
| 50 | +`export TF_VAR_private_key_password=` |
17 | 51 |
|
18 | | -Credentials required: |
19 | | -* Tenancy OCID |
20 | | -* User OCID |
21 | | -* API Key |
| 52 | +Don't forget to `source ~/.bash_profile` once you've set these. |
22 | 53 |
|
23 | | -Also you will be needing Terraform 0.6.16+ |
24 | | -[Terraform Install](https://www.terraform.io/intro/getting-started/install.html) |
| 54 | +#### Windows |
| 55 | +`setx TF_VAR_tenancy_ocid <value>` |
| 56 | +`setx TF_VAR_user_ocid <value>` |
| 57 | +`setx TF_VAR_fingerprint <value>` |
| 58 | +`setx TF_VAR_private_key_path <value>` |
| 59 | +`setx TF_VAR_private_key_password <value>` |
25 | 60 |
|
26 | | -## Usage |
| 61 | +The variables won't be set for the current session, exit the terminal and reopen. |
27 | 62 |
|
28 | | -**Terraform basics** |
| 63 | +## Deploy an example configuration |
| 64 | +Download the [VCN example configuration.](https://github.com/oracle/terraform-provider-baremetal/tree/master/docs/examples/simple_vcn) |
29 | 65 |
|
30 | | -* [Getting Started](https://www.terraform.io/intro/getting-started/install.html) |
| 66 | +Edit it to include the OCID of the compartment you want to create the VCN. Remember that the tenancy OCID is the compartment OCID of your root compartment. |
31 | 67 |
|
32 | | -**Provider Installation** |
| 68 | +You should always plan, then apply a configuration - |
| 69 | +``` |
| 70 | +$ terraform plan ./simple_vcn |
| 71 | +# Make sure the plan looks right. |
| 72 | +$ terraform apply ./simple_vcn |
| 73 | +``` |
| 74 | +## OBMC resource and datasource details |
| 75 | +https://github.com/oracle/terraform-provider-baremetal/tree/master/docs |
33 | 76 |
|
34 | | -To install the provider, put the binary somewhere on your filesystem then configure Terraform to be able to find it. |
35 | | -The configuration where plugins are defined is ~/.terraformrc for Unix-like systems and %APPDATA%/terraform.rc for Windows. |
| 77 | +## Getting help |
| 78 | +You can file an issue against the project |
| 79 | +https://github.com/oracle/terraform-provider-baremetal/issues |
36 | 80 |
|
37 | | -```json |
38 | | -providers { |
39 | | - oraclebaremetal = "/path/to/plugin" |
40 | | -} |
41 | | -``` |
| 81 | +or meet us in the OBMCS forums |
| 82 | +https://community.oracle.com/community/cloud_computing/bare-metal |
| 83 | + |
| 84 | +## Known bugs |
| 85 | +### Key passphrase |
| 86 | +The private key you use for API access must have a passphrase to work with Terraform. You can add a passphrase to your existing key with `ssh-keygen -p -f <private key>`. |
42 | 87 |
|
43 | | -**Provider Datasources Documentation** |
| 88 | +If you don't want to apply a passphrase to the version of the key you don't use with Terraform you can copy the key first - |
| 89 | +``` |
| 90 | +cp <private key> <private key>.pass |
| 91 | +ssh-keygen -p -f <private key>.pass |
| 92 | +``` |
| 93 | +### DB Systems timeout |
| 94 | +DB Systems can take up to an hour to provision. Terraform times out after 5 minutes. Ensure the DB System is the last resource you provision in a configuration. |
44 | 95 |
|
45 | | -**Provider Resources Documentation** |
46 | | -* [Object Storage: Bucket](./docs/resources/object_storage_bucket.md) |
| 96 | +### Block volumes |
| 97 | +The size of a block volume cannot be specified, volumes created by Terraform are 256GB. |
47 | 98 |
|
48 | | -## Development |
49 | | -[**Developer Guide**](docs/development.md) |
| 99 | +#### About the provider |
| 100 | +This provider was written on behalf of Oracle by [MustWin.](http://mustwin.com/) |
0 commit comments