Skip to content
This repository has been archived by the owner on Oct 31, 2019. It is now read-only.

Commit

Permalink
Rename all instances of "baremetal" provider to "oci".
Browse files Browse the repository at this point in the history
  • Loading branch information
jlamillan committed Oct 11, 2017
1 parent 6b173ab commit b8ddfa2
Show file tree
Hide file tree
Showing 30 changed files with 129 additions and 129 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[terraform]: https://terraform.io
[bmcs]: https://cloud.oracle.com/en_US/bare-metal
[bmcs provider]: https://github.com/oracle/terraform-provider-baremetal/releases
[oci provider]: https://github.com/oracle/terraform-provider-oci/releases
[SSH key pair]: https://docs.us-phoenix-1.oraclecloud.com/Content/GSG/Tasks/creatingkeys.htm
[API signing]: https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm
[Kubectl]: https://kubernetes.io/docs/tasks/tools/install-kubectl/
Expand Down Expand Up @@ -41,11 +41,11 @@ configuration, the modules can be used to form your own customized configuration
## Prerequisites

1. Download and install [Terraform][terraform]
2. Download and install the [OCI Terraform Provider][bmcs provider] (recommended version: v1.0.18)
2. Download and install the [OCI Terraform Provider][oci provider] (v2.0.0 or later)
3. Create an Terraform configuration file at `~/.terraformrc` that specifies the path to the OCI provider:
```
providers {
baremetal = "<path_to_provider_binary>/terraform-provider-baremetal"
providers {
oci = "<path_to_provider_binary>/terraform-provider-oci"
}
```
4. Create a _terraform.tfvars_ file in the project root that specifies your [API signature](API signing), tenancy, user, and compartment within OCI:
Expand All @@ -61,7 +61,7 @@ $ cp terraform.example.tfvars terraform.tfvars
To run the Terraform scripts, you'll first need to download and install the Terraform binary and [OCI Provider][bmcs provider] as well as OCI access. Check out the [prerequisites](README.md#prerequisites) section for more details.

The quickest way to get a Kubernetes cluster up and running on OCI is to simply use the base configuration defined in
the top-level file `k8s-baremetal.tf`:
the top-level file `k8s-oci.tf`:

```bash
# initialize your Terraform configuration including the modules
Expand Down Expand Up @@ -304,10 +304,10 @@ We can use `terraform taint` to worker instances in a particular AD as "tainted"

```bash
# taint all workers in AD1
terraform taint -module=instances-k8sworker-ad1 baremetal_core_instance.TFInstanceK8sWorker
terraform taint -module=instances-k8sworker-ad1 oci_core_instance.TFInstanceK8sWorker
# optionally taint workers in AD2 and AD3 or do so in a subsequent apply
# terraform taint -module=instances-k8sworker-ad2 baremetal_core_instance.TFInstanceK8sWorker
# terraform taint -module=instances-k8sworker-ad3 baremetal_core_instance.TFInstanceK8sWorker
# terraform taint -module=instances-k8sworker-ad2 oci_core_instance.TFInstanceK8sWorker
# terraform taint -module=instances-k8sworker-ad3 oci_core_instance.TFInstanceK8sWorker

# preview changes
$ terraform plan
Expand All @@ -324,10 +324,10 @@ We can also use `terraform taint` to master instances in a particular AD as "tai

```bash
# taint all masters in AD1
terraform taint -module=instances-k8smaster-ad1 baremetal_core_instance.TFInstanceK8sMaster
terraform taint -module=instances-k8smaster-ad1 oci_core_instance.TFInstanceK8sMaster
# optionally taint masters in AD2 and AD3 or do so in a subsequent apply
# terraform taint -module=instances-k8smaster-ad2 baremetal_core_instance.TFInstanceK8sMaster
# terraform taint -module=instances-k8smaster-ad3 baremetal_core_instance.TFInstanceK8sMaster
# terraform taint -module=instances-k8smaster-ad2 oci_core_instance.TFInstanceK8sMaster
# terraform taint -module=instances-k8smaster-ad3 oci_core_instance.TFInstanceK8sMaster

# preview changes
$ terraform plan
Expand Down
2 changes: 1 addition & 1 deletion datasources.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
data "baremetal_identity_availability_domains" "ADs" {
data "oci_identity_availability_domains" "ADs" {
compartment_id = "${var.tenancy_ocid}"
}

Expand Down
4 changes: 2 additions & 2 deletions instances/etcd/datasources.tf
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Cloud call to get the OCID of the OS image to use
data "baremetal_core_images" "ImageOCID" {
data "oci_core_images" "ImageOCID" {
compartment_id = "${var.compartment_ocid}"
operating_system = "Canonical Ubuntu"
operating_system_version = "${var.instance_os_ver}"
}

# Cloud call to get a list of Availability Domains
data "baremetal_identity_availability_domains" "ADs" {
data "oci_identity_availability_domains" "ADs" {
compartment_id = "${var.tenancy_ocid}"
}

Expand Down
4 changes: 2 additions & 2 deletions instances/etcd/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
* The instances/etcd module provisions and configures one or more etcd instances.
*/

resource "baremetal_core_instance" "TFInstanceEtcd" {
resource "oci_core_instance" "TFInstanceEtcd" {
count = "${var.count}"
availability_domain = "${var.availability_domain}"
compartment_id = "${var.compartment_ocid}"
display_name = "${var.label_prefix}${var.display_name}-${count.index}"
hostname_label = "${var.hostname_label}-${count.index}"
image = "${lookup(data.baremetal_core_images.ImageOCID.images[0], "id")}"
image = "${lookup(data.oci_core_images.ImageOCID.images[0], "id")}"
shape = "${var.shape}"
subnet_id = "${var.subnet_id}"

Expand Down
8 changes: 4 additions & 4 deletions instances/etcd/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Output the private and public IPs of the instance

output "ids" {
value = ["${baremetal_core_instance.TFInstanceEtcd.*.id}"]
value = ["${oci_core_instance.TFInstanceEtcd.*.id}"]
}

output "hostname_label" {
value = "${baremetal_core_instance.TFInstanceEtcd.hostname_label}"
value = "${oci_core_instance.TFInstanceEtcd.hostname_label}"
}

output "private_ips" {
value = ["${baremetal_core_instance.TFInstanceEtcd.*.private_ip}"]
value = ["${oci_core_instance.TFInstanceEtcd.*.private_ip}"]
}

output "instance_public_ips" {
value = ["${baremetal_core_instance.TFInstanceEtcd.*.public_ip}"]
value = ["${oci_core_instance.TFInstanceEtcd.*.public_ip}"]
}
4 changes: 2 additions & 2 deletions instances/k8smaster/datasources.tf
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Gets the OCID of the OS image to use
data "baremetal_core_images" "ImageOCID" {
data "oci_core_images" "ImageOCID" {
compartment_id = "${var.compartment_ocid}"
operating_system = "Canonical Ubuntu"
operating_system_version = "${var.instance_os_ver}"
}

# Cloud call to get a list of Availability Domains
data "baremetal_identity_availability_domains" "ADs" {
data "oci_identity_availability_domains" "ADs" {
compartment_id = "${var.tenancy_ocid}"
}

Expand Down
4 changes: 2 additions & 2 deletions instances/k8smaster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
* The instances/k8smaster module provisions and configures one or more Kubernetes Master instances.
*/

resource "baremetal_core_instance" "TFInstanceK8sMaster" {
resource "oci_core_instance" "TFInstanceK8sMaster" {
count = "${var.count}"
availability_domain = "${var.availability_domain}"
compartment_id = "${var.compartment_ocid}"
display_name = "${var.label_prefix}${var.display_name_prefix}-${count.index}"
hostname_label = "${var.hostname_label_prefix}-${count.index}"
image = "${lookup(data.baremetal_core_images.ImageOCID.images[0], "id")}"
image = "${lookup(data.oci_core_images.ImageOCID.images[0], "id")}"
shape = "${var.shape}"
subnet_id = "${var.subnet_id}"

Expand Down
6 changes: 3 additions & 3 deletions instances/k8smaster/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
output "ids" {
value = ["${baremetal_core_instance.TFInstanceK8sMaster.*.id}"]
value = ["${oci_core_instance.TFInstanceK8sMaster.*.id}"]
}

output "private_ips" {
value = ["${baremetal_core_instance.TFInstanceK8sMaster.*.private_ip}"]
value = ["${oci_core_instance.TFInstanceK8sMaster.*.private_ip}"]
}

output "public_ips" {
value = ["${baremetal_core_instance.TFInstanceK8sMaster.*.public_ip}"]
value = ["${oci_core_instance.TFInstanceK8sMaster.*.public_ip}"]
}
4 changes: 2 additions & 2 deletions instances/k8sworker/datasources.tf
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Gets the OCID of the OS image to use
data "baremetal_core_images" "ImageOCID" {
data "oci_core_images" "ImageOCID" {
compartment_id = "${var.compartment_ocid}"
operating_system = "Canonical Ubuntu"
operating_system_version = "${var.instance_os_ver}"
}

# Cloud call to get a list of Availability Domains
data "baremetal_identity_availability_domains" "ADs" {
data "oci_identity_availability_domains" "ADs" {
compartment_id = "${var.tenancy_ocid}"
}

Expand Down
4 changes: 2 additions & 2 deletions instances/k8sworker/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
* The instances/k8sworker module provisions and configures one or more Kubernetes Worker instances.
*/

resource "baremetal_core_instance" "TFInstanceK8sWorker" {
resource "oci_core_instance" "TFInstanceK8sWorker" {
count = "${var.count}"
availability_domain = "${var.availability_domain}"
compartment_id = "${var.compartment_ocid}"
display_name = "${var.label_prefix}${var.display_name_prefix}-${count.index}"
hostname_label = "${var.hostname_label_prefix}-${count.index}"
image = "${lookup(data.baremetal_core_images.ImageOCID.images[0], "id")}"
image = "${lookup(data.oci_core_images.ImageOCID.images[0], "id")}"
shape = "${var.shape}"
subnet_id = "${var.subnet_id}"

Expand Down
8 changes: 4 additions & 4 deletions instances/k8sworker/output.tf
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
output "ids" {
value = ["${baremetal_core_instance.TFInstanceK8sWorker.*.id}"]
value = ["${oci_core_instance.TFInstanceK8sWorker.*.id}"]
}

output "private_ips" {
value = ["${baremetal_core_instance.TFInstanceK8sWorker.*.private_ip}"]
value = ["${oci_core_instance.TFInstanceK8sWorker.*.private_ip}"]
}

output "public_ips" {
value = ["${baremetal_core_instance.TFInstanceK8sWorker.*.public_ip}"]
value = ["${oci_core_instance.TFInstanceK8sWorker.*.public_ip}"]
}

output "instance_host_names" {
value = ["${baremetal_core_instance.TFInstanceK8sWorker.*.display_name}"]
value = ["${oci_core_instance.TFInstanceK8sWorker.*.display_name}"]
}
Loading

0 comments on commit b8ddfa2

Please sign in to comment.