Note:

Prepare and configure OCI Resource Manager Stack for creating extra nodes on OKE

Introduction

This is part two of a six-part tutorial series that shows you how to deploy a temporary set of resources on an OKE cluster using Golang microservices representing the usage of OCI SDK, OCI-CLI, Resource Manager, OCI Devops and Helm to deploy and destroy Apache Airflow.

Objective

Configure OCI Resource Manager Stack and create a new node pool on the OKE cluster.

Prerequisites

Task 1: Create the OCI Resource Manager stack using OCI-CLI command line

  1. Go to your bastion jump-box console and install git bastion virtual machine jump-box.

    sudo yum install git -y
    

    T3_4

  2. Get the task1_step_2_package.zip that contains the Terraform files to add new node on OKE and save it on the jump-box host.

    cd $HOME
    wget https://docs.us.oracle.com/en/learn/resource-manager-airflow-oke-part2/files/task1_step_2_package.zip
    unzip task1_step_2_package.zip
    

    T1_2

  3. Modify the variables related to your tenant with the variables you have noted.

    • Edit the vars_to_stack.json file and replace the values of each required variable.

      {"compartment_id": "ocid1.compartment.oc1..xxx",
       "region": "sa-saopaulo-1",
       "ssh_public_key": "ssh-rsa AAAxxx",
       "extra_node_pool_subnet": "ocid1.subnet.oc1.sa-saopaulo-1.xxx",
       "oke_cluster_id": "ocid1.cluster.oc1.sa-saopaulo-1.xxx",
       "kubernetes_version": "v1.25.4"
       }
      

      Important TIP: To avoid parsing errors regarding your ssh-key, you must remove the line break. Run the following command to get your ssh public key:

      cat ~/.ssh/id_rsa.pub | tr '' '\n'   
      
  4. Now run the OCI-CLI command to create the resource manager stack on your tenant. Make sure you replace the compartment id with the one for your tutorial.

    export COMPARTMENT_ID="place_your_compartment_id_here"
    oci resource-manager stack create --compartment-id $COMPARTMENT_ID --config-source ./extra_nodes.zip --variables file://vars_to_stack.json --display-name "CLI Extra nodes" --description "New nodes for workload only labeled" --working-directory ""
    

    T1_2

    • Take note of the id created on your stack manager from the console as shown in the following image.

      T1_2

Your resource manager stack has been created and you’re good to proceed with the next part of this lab.

Next Step

To proceed to the next tutorial in this learning path, click here.

Acknowledgments

More Learning Resources

Explore other labs on docs.oracle.com/learn or access more free learning content on the Oracle Learning YouTube channel. Additionally, visit education.oracle.com/learning-explorer to become an Oracle Learning Explorer.

For product documentation, visit Oracle Help Center.