Giter VIP home page Giter VIP logo

digikube-public's Introduction

Digikube

Digikube is integrated stack cosnsisting of various digital platform technologies packaged on top of Kubernetes. Current Digikube version is specifically designed for GCP and Kubernetes v1.14+

There are three github repositories for digikube. These are:

  1. digikube-public : This is public repository with public read access
  2. digikube-core : This is private repository with bulk of the digikube code. Access token for this repository will be shared on need basis.
  3. c1-dev1 : This is private repository for storing the configuration details of your digikube environment.

Preparation

To setup your digikube environment, follow the steps below.

  1. Request the access token for digikube-core
  2. Clone the digikube-public repository
  3. Clone the c1-dev1 repository
  4. edit cloned digikube-public repository to modify the following:
    • create-digikube-master Edit the following lines and update with appropriate values for your environment.
      DIGIKUBE_MASTER_PROJECT="digikube-master3"
      DIGIKUBE_CLOUD_REGION="us-central1"
      
      This script created the master project in GCP to securly hold the digikube private repo access token.
    • create-digikube Edit the following lines and update with appropriate values for your environment.
      digikubeInstanceRawRepoUrl="https://raw.githubusercontent.com/samdesh-gcp1/c1-dev1/master"
      digikubeMasterProject="digikube-master3"
      digikubeCoreRepoAccessTokenVersion="1"
      digikubeInstanceRepoAccessTokenVersion="1"
      
    • delete-digikube Edit the following lines and update with appropriate values for your environment.
      digikubeInstanceRawRepoUrl="https://raw.githubusercontent.com/samdesh-gcp1/c1-dev1/master"
      digikubeMasterProject="digikube-master3"
      digikubeCoreRepoAccessTokenVersion="1"
      digikubeInstanceRepoAccessTokenVersion="1"
      forcedFlag="--forced"
      

Setting up digikube-master

  • Login to your GCP web console
  • Launch cloud shell
  • Unset the cloud project setting by executing the following command:
    gcloud config unset project
    
  • Execute the following command to create master project and populate github access token secret:
    wget --quiet --no-cache -O - https://raw.githubusercontent.com/samdesh-gcp1/digikube-public/master/create-digikube-master | bash
    
    Modify the url to refer to the public repo you have created in step 2 above
  • Verify if the master project is successfully created
  • Verify that the github access token secrete is created

Setting up digikube cluster

  • Login to your GCP web console
  • Launch cloud shell
  • Unset the cloud project setting by executing the following command:
    gcloud config unset project
    
  • Execute the following command to create digikube cluster:
    wget --quiet --no-cache -O - https://raw.githubusercontent.com/samdesh-gcp1/digikube-public/master/create-digikube | bash
    
    modify the url to refer to the public repo you have created in step 2 above
  • Verify if execution is successfull (it may take upto 10 min to complete the entire process). Verify if the cluster resources are successfully created.
  • SSH to the bastion host and go to digikube directory.
    cd /opt/digikube/
    
  • digikube directory should have three folders
    • core - contains all the code for digikube
    • clusters/cluster1 - contains artifacts related to your cluster (config files)
    • exec - contains logs and cluster lock files
  • View the logs to verify the cluster deployment process
  • Execute the following command to verify cluster status:
    digiops cluster validate
    
  • The cluster is up and ready

Stopping and starting the cluster (without deleting)

  • SSH to the bastion host
  • Execute the following command to stop the cluster:
    digiops cluster stop
    
  • Execute the following command to start the cluster:
    digiops cluster start
    
  • Validate the cluster status using the following command:
    digiops cluster validate
    

Modifying Digikube configuration

Certain cluster resources such as number of worker nodes or the size of the worker nodes can be modified with rolling upgrade. For this follow the folling steps:

  • Edit the cluster configuration in git hub repository and change the required configurations
  • SSH to the bastion host
  • Execute the following command to modify the running cluster:
    digiops cluster synch
    
  • Please note that current version of digikube (v0.3) supports modification of only select cluster configurations. For extensive cluster changes including name change, please delete the existing cluster and recreate new cluster with the new configuration.

Upgrading Digikube

  • For latest minor version upgrade, please follow the steps below:
    • SSH the bastion host
    • Execute the following command
      digiops cluster reload
      
  • For specific minor version upgrade, please follow the steps below: (Note: Feature not yet ready)
    • Change the github repository tag in configurations
    • SSH the bastion host
    • Execute the following command
      digiops cluster reload
      
  • For major version upgrade, it is advised to delete the existing cluster and recreate new cluster.

Deleting digikube cluster

  • Login to your GCP web console
  • Launch cloud shell
  • Unset the cloud project setting by executing the following command:
    gcloud config unset project
    
  • Execute the following command to delete digikube cluster:
    wget --quiet --no-cache -O - https://raw.githubusercontent.com/samdesh-gcp1/digikube-public/master/delete-digikube | bash
    
    Modify the url to refer to the public repo you have created in step 2 above
  • Verify if execution is successfull (it may take upto 5-7 min to complete the entire process). Verify if the cluster resources are successfully deleted.
  • The cluster is deleted

digikube-public's People

Contributors

samdesh-gcp1 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.