Giter Site home page Giter Site logo

gcp-infra-gitops's Introduction

Provisioning-Infrastructure-Using-Terraform-GithubActions

Step-by-step guide

  1. Setting up Google Cloud Project (skip if you already have a GCP Project)
  • Go to Google Cloud and click on Get Started for FREE.
  • Login using your gmail account, choose your country, accept terms and conditions and click Continue.
  • In the next step, fill your details, like account type, Name, Address, credit card details, tax information, etc. If you have old Gmail account and all the information is already there it would take it and you might not have to fill all the details.
  • After filling all the details click on Start my free trial.
  • Google will setup your cloud account and in few seconds your Google Cloud Platform account will be ready to start deploying applications on it. It will look like below: Project Setup
  1. Creating Service Account to access Google Cloud from outside
  • Go to Navigation Menu(Top left Corner) > IAM & Admin > Service Accounts
  • Click on Create Service Account
  • Under Service Account Details provide service account name and description of your choice and click on Create Service Account Details
  • Under Service Account Permissions select Project > Owner Role and click on Continue Service Account Permissions
  • Keep User Access Section unchanged and click on Done
  • On Service Account Page click on Actions hamburger menu of Service Account you just created and Click on Create Key Service Account Create Key
  • Select JSON option and Click on Create. A JSON file will get downloaded on your local system, save it we will need it later* Service Account JSON
  1. Creating Github Secrets
  • Fork this repository

  • Go to Settings > Secrets in your forked repository.

  • Click on New Secret and add Name as PROJECT_ID and value as Project ID of your GCP Project and click on Add Secret New Secret

  • Again click on New Secret and add Name as GOOGLE_APPLICATION_CREDENTIALS and value as *contents of json file that you downloaded and click on Add Secret

  • KEEP IN MIND, not to change Secret Names otherwise you will need to alter .github/workflows/terraform.yml file

  1. Editing github actions workflow to create required infrastructure
  • In your forked repository, Visit .github/workflows/terraform.yml

  • Edit this file online by clicking on pencil icon on top right.

  • Replace your actual codecomp3 team name with on line 27 and line 46 as shown in figure below with yellow highligher Editing github workflow

  • Click on Start Commit and then Commit Changes

  • On commiting changes, you can see the Git Action running in Actions tab. Wait for this to complete as shown below: Github Action

  1. When this Action gets completed you have the infrastructure ready to deploy your codecomp3 bot on.

Please follow the remaining steps on this repo to deploy codecomp3 bot on infrastructure you just created

gcp-infra-gitops's People

Contributors

ayu004 avatar

Watchers

 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.