Giter VIP home page Giter VIP logo

keptnqualitygates-minikube's Introduction

keptnqualitygates-minkube

This repo will help you in setting up minikube on a GCE instance using terraform. It will execute the following steps:

  1. Create a GCE instance with nested virtualization
  2. Install Ubuntu and all required packages
  3. Install Minikube v1.2.0 (newer not supported) and start an instance
  4. Install Keptn Quality Gates usecase
  5. Expose the Keptn API on port 80
  6. Expose the Keptn Bridge on port 81

note: For a fully automated install, the script deploys the latest master of the keptn CLI, as otherwise a creds.json file cannot be supplied in combination with platform=kubernetes.

Requirements

To run this script, terraform will provision the following

  1. 1 n1-standard-2 GCE instance (2vCores, 7.5GB RAM) with 50GB SSD
  2. 1 public IPv4 address attached to the GCE instance
  3. 1 firewall rule to open port 80 and 81

Instructions

  1. Prepare Service Account and download JSON key credentials in GCP.

    https://cloud.google.com/iam/docs/creating-managing-service-accounts
    
  2. Provision VM

    The provisioning of the GCE instance is done via Terraform configurations. Therefore, Terraform has to be installed on the machine of the user that is creating the instance.

    Please note that you need to provide a keypair for creating the bastion host.

    1. Create key pair

      ssh-keygen -b 2048 -t rsa -f key
      

      Enter through the defaults.

    2. Initialize terraform

      $ terraform init
      
    3. Reference the vars.tf file for the variables required to deploy the GCE instance. Some default values, such as instance_size, hostname and serviceaccount_id won't need to be modified.

      Create your own tfvars file outside this repository's root directory (such as /tmp/provision.tfvars). Add the required variables and values. For example: provision.tfvars

      gcloud_project    = "myProject" 
      gcloud_zone       = "us-central1-a"
      gcloud_cred_file  = "~/.gcloud/my_key.json" # this file holds your GCP SA key
      
    4. Apply the terraform configuration supplying your own vars file. Ensure to enable the Cloud Resource Manager API and the Identity and Access Management (IAM) API in Google Cloud.

      optional: $ terraform plan -var-file=/tmp/provision_acm.tfvars
      $ terraform apply -var-file=/tmp/provision_acm.tfvars
      
    5. The GCE ip will be outputed once completed, as well as the keptn api endpoint and API token

  3. Log on to the GCE instance

    Once the instance has been fully provisioned, you can log on via ssh supplying your key. The default username is keptn, however this is supplied as a variable and can be overwritten.

    $ ssh -i key [email protected]
    

keptnqualitygates-minikube's People

Contributors

kristofdynatrace avatar kristofre avatar

Watchers

James Cloos 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.