GithubHelp home page GithubHelp logo

badr42 / oke_a1 Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 3.0 139 KB

Terraform to provision an OCI OKE cluster on Ampere A1 Processors, and then deploy nginx on it

Shell 2.76% HCL 97.24%
ampere iaac nginx oci

oke_a1's Introduction

Ampere A1 OKE Cluster

Terraform script that helps you provision OKE cluster running on A1 on OCI

Ampere A1

Ampere A1 is one of the most cost effective chips available in the market, it allows for low cost computing that can be leveraged for special scenarios, such as parallel computing and webhosting.

The script will provision a cluster with 2 nodes (both on the same AD) on 2 OCPUs each. In the configuration section we'll show how to modify the number of nodes and OCPUs.

The script will then provision nginx (2 pods) and explose it behind a load balancer.

Architecture

results

Requirements

  1. OCI tenancy
  2. An OCI compartment

Configuration

  1. Log into cloud console
  2. run the following
git clone https://github.com/badr42/OKE_A1
cd OKE_A1
export TF_VAR_tenancy_ocid='<tenancy-ocid>'
export TF_VAR_compartment_ocid='<comparment-ocid>'
export TF_VAR_region='<home-region>'
<optional>
### Select Availability Domain, zero based, if not set it defaults to 0, this allows you to select an AD that has available A1 chips
export TF_VAR_AD_number='0'

### Select number of nodes
export TF_VAR_node_count='2'

### Set OCPU count per node
export TF_VAR_ocpu_count='2'

Build

To build simply execute the next commands.

terraform init
terraform plan
terraform apply

After applying, the service will be ready in about 25 minutes

Post configuration

You should be able to get your nginx LB IP by running the following command

kubectl  --kubeconfig kubeconfig get service

the result should look like and you can see the external IP of the LB

results

Terminating the environment

When are done please run

terraform destroy

You can also use the following github repo to provision wordpress

https://github.com/oracle-devrel/helm-oci-mds-wordpress

oke_a1's People

Contributors

badr42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

oke_a1's Issues

Terraform Apply Error

First want to say "thanks you very much" for this repo
unfortunately doing all according to manual i got an error

image

anything you can advice ?
Regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.