Giter VIP home page Giter VIP logo

tdc-cks-demo's Introduction


tdc-2021 terraform-latest google-cloud k8s-v1.22.2

Repositório criado para auxiliar no processo de demonstração do TDC 2021 sessão FullCycle.


Para provisionar seu ambiente certifique-se de ter seguido todos os passos a seguir

CRIANDO CHAVE PARA CONTA DE SERVICO NA GCP

  1. Create Service Account

OBTENDO ID DO PROJETO NO CONSOLE GCP

  1. Project ID

EXPORTANDO VARIAVEIS DE AMBIENTE

  1. Adicionar caminho absoluto do arquivo.json que contem sua ServiceAccountKey obtida na criação da key:
export GOOGLE_APPLICATION_CREDENTIALS=/seu/path/para/arquivo.json
  1. Adicionar ID do projeto GCP:
export GOOGLE_PROJECT=seu-project-id

ADICIONANDO VARIAVEIS DE AMBIENTE NO BASH PROFILE

sudo tee -a ~/.bashrc > /dev/null <<EOF
# EXPORTING PROVIDER GCP VARS TO TERRAFORM
export GOOGLE_APPLICATION_CREDENTIALS=/seu/path/para/arquivo.json
export GOOGLE_PROJECT=seu-project-id
EOF

RESOLVENDO PROBLEMA DE EXPORT NO WINDOWS

provider "google" {
  project     = "project-id"
  credentials = file("/path/para/arquivo.json")
}

CLONE O REPO

git clone https://github.com/dihogoteixeira/tdc-cks-demo.git
cd tdc-cks-demo/setup

DEFININDO SSH-KEY E USERNAME PARA SSH

Edite o arquivo main.tf e altere os VALUES da lista ssh_keys, substituindo pela sua chave publica, e seu username conforme exemplo abaixo:

  ...

  ssh_keys = [
      {
          publickey = "ssh-rsa yourkeyabc username@PC"
          user      = "username"
      } 
  ]

  ...

Realize essa substituição para ambos os módulos master e worker instanciados no arquivo main.tf.

EXECUTANDO O SETUP DO CLUSTER

terraform init
terraform plan
terraform apply -auto-approve

tdc-cks-demo's People

Contributors

dihogoteixeira avatar meli-diteixeira avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.