-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added required terraform configuration files and updated the steps in…
… README
- Loading branch information
1 parent
0993fa1
commit 556fae8
Showing
13 changed files
with
288 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
# Copyright (c) 2023, Oracle and/or its affiliates. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. | ||
*/ | ||
resource "oci_file_storage_export" "oketest_export1" { | ||
#Required | ||
export_set_id = oci_file_storage_export_set.oketest_export_set.id | ||
file_system_id = oci_file_storage_file_system.oketest_fs1.id | ||
path = "/oketest1" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* | ||
# Copyright (c) 2023, Oracle and/or its affiliates. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. | ||
*/ | ||
|
||
resource "oci_file_storage_export_set" "oketest_export_set" { | ||
# Required | ||
mount_target_id = oci_file_storage_mount_target.oketest_mount_target.id | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* | ||
# Copyright (c) 2023, Oracle and/or its affiliates. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. | ||
*/ | ||
|
||
resource "oci_file_storage_file_system" "oketest_fs1" { | ||
#Required | ||
availability_domain = data.oci_identity_availability_domains.ADs.availability_domains[1]["name"] | ||
compartment_id = var.compartment_ocid | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
# Copyright (c) 2023, Oracle and/or its affiliates. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. | ||
*/ | ||
resource "oci_file_storage_mount_target" "oketest_mount_target" { | ||
#Required | ||
availability_domain = data.oci_identity_availability_domains.ADs.availability_domains[1]["name"] | ||
|
||
compartment_id = var.compartment_ocid | ||
subnet_id = oci_core_subnet.oke-subnet-worker-2.id | ||
|
||
#Optional | ||
display_name = "${var.cluster_name}-mt" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
# Copyright (c) 2023, Oracle and/or its affiliates. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. | ||
*/ | ||
resource "oci_containerengine_node_pool" "tfsample_node_pool" { | ||
#Required | ||
cluster_id = oci_containerengine_cluster.tfsample_cluster.id | ||
compartment_id = var.compartment_ocid | ||
kubernetes_version = var.node_pool_kubernetes_version | ||
name = var.node_pool_name | ||
node_shape = var.node_pool_node_shape | ||
subnet_ids = [oci_core_subnet.oke-subnet-worker-1.id, oci_core_subnet.oke-subnet-worker-2.id] | ||
|
||
timeouts { | ||
create = "60m" | ||
delete = "2h" | ||
} | ||
|
||
node_eviction_node_pool_settings{ | ||
is_force_delete_after_grace_duration = true | ||
eviction_grace_duration = "PT0M" | ||
} | ||
|
||
|
||
# Using image Oracle-Linux-7.x-<date> | ||
# Find image OCID for your region from https://docs.oracle.com/iaas/images/ | ||
node_source_details { | ||
image_id = var.node_pool_node_image_name | ||
source_type = "image" | ||
boot_volume_size_in_gbs = "200" | ||
} | ||
node_shape_config { | ||
#Optional | ||
memory_in_gbs = 48.0 | ||
ocpus = 4.0 | ||
} | ||
# Optional | ||
initial_node_labels { | ||
key = "name" | ||
value = "var.cluster_name" | ||
} | ||
ssh_public_key = var.node_pool_ssh_public_key | ||
} | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,62 @@ | ||
# Copyright (c) 2018, 2021, Oracle and/or its affiliates. | ||
# Copyright (c) 2018, 2023, Oracle and/or its affiliates. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. | ||
|
||
# Properties to generate TF variables file for cluster creation from property file oci.props | ||
# | ||
# Copy this file to oci.props and update it with your own info, see oci.props.example as sample for values | ||
# Copy this file to oci.props and update it with custom attribute value, see example values provided for each property | ||
# | ||
|
||
# OCID can be obtained from the user info page in the OCI console | ||
#user.ocid=ocid1.user.oc1..xxxxyyyyzzzz | ||
user.ocid= | ||
|
||
# name of OKE cluster | ||
#okeclustername=myokecluster | ||
okeclustername= | ||
|
||
# name of tfvars file (no extention) to generate | ||
#tfvars.filename=myokeclustertf | ||
tfvars.filename= | ||
|
||
# Required tenancy info | ||
#region=us-phoenix-1 | ||
#tenancy.ocid=ocid1.tenancy.oc1..xxxxyyyyzzzz | ||
#compartment.ocid=ocid1.compartment.oc1..xxxxyyyyzzzz | ||
#compartment.name=<compartment_name> | ||
region= | ||
tenancy.ocid= | ||
compartment.ocid= | ||
compartment.name= | ||
region= | ||
|
||
|
||
# API key fingerprint and private key location, needed for API access -- you should have added a public API key through the OCI console first, add escape backslash \ for each colon signt | ||
#ociapi.pubkey.fingerprint=c8\:b2\:da\:b2\:e8\:96\:7e\:bf\:a1\:ee\:ce\:bc\:a8\:7f\:07\:c5 | ||
ociapi.pubkey.fingerprint= | ||
|
||
# path to private OCI API key | ||
#ocipk.path=/scratch/<user>/.oci/oci_api_key.pem | ||
ocipk.path= | ||
|
||
# VCN CIDR -- must be unique within the compartment in the tenancy | ||
# - assuming 1:1 cluster:vcn | ||
# BE SURE TO SET BOTH VARS -- the first 2 octets for each variable have to match | ||
#vcn.cidr.prefix=10.1 | ||
#vcn.cidr=10.1.0.0/16 | ||
vcn.cidr.prefix= | ||
vcn.cidr= | ||
|
||
# Node pool info | ||
#nodepool.shape=VM.Standard2.1 | ||
#nodepool.ssh.pubkey=ssh-rsa AAAAB3NzaC1yc2EAAAAQAAAABAQC9FSfGdjjL+EZre2p5yLTAgtLsnp49AUVX1yY9V8guaXHol6UkvJWnyFHhL7s0qvWj2M2BYo6WAROVc0/054UFtmbd9zb2oZtGVk82VbT6aS74cMlqlY91H/rt9/t51Om9Sp5AvbJEzN0mkI4ndeG/5p12AUyg9m5XOdkgI2n4J8KFnDAI33YSGjxXb7UrkWSGl6XZBGUdeaExo3t2Ow8Kpl9T0Tq19qI+IncOecsCFj1tbM5voD8IWE2l0SW7V6oIqFJDMecq4IZusXdO+bPc+TKak7g82RUZd8PARpvYB5/7EOfVadxsXGRirGAKPjlXDuhwJYVRj1+IjZ+5Suxz user@slc13kef | ||
#nodepool.imagename=<ocid of the image> | ||
nodepool.shape= | ||
nodepool.ssh.pubkey= | ||
nodepool.imagename= | ||
|
||
# K8S version | ||
#k8s.version=v1.26.2 | ||
k8s.version= | ||
|
||
#location for terraform installation | ||
#terraform.installdir=/scratch/<user>/myterraformtest | ||
terraform.installdir= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.