Skip to content

Latest commit

 

History

History
67 lines (54 loc) · 1.72 KB

README.md

File metadata and controls

67 lines (54 loc) · 1.72 KB

Mono-repo

Install gitkube cli as per this

  1. Download this repo and unzip it to a path
$ wget https://github.com/hasura/gitkube-example/archive/master.zip
$ unzip master.zip
$ mv gitkube-example-master gitkube-examples
  1. Goto mono-repo directory and initialise a repo
$ cd gitkube-examples/mono-repo
$ git init
$ git commit -am 'init'
  1. Generate a Remote spec
$ gitkube remote generate -f myremote.yaml

> Remote name: myremote
> Namespace: default
> Public key file: /home/tselvan/.ssh/id_rsa.pub
> Initialisation:
    > K8s Yaml Manifests
    --------------------
    > Helm Chart
    > None
> Manifests/Chart directory: manifests
> Choose docker registry:
    > docker.io/tirumarai
    ---------------------
    > Specify a different registry
    > Skip for now
> Deployment name: www
> Container name: www
> Dockerfile path: microservices/nginx/Dockerfile
> Build context path: microservice/nginx
> Add another container? N
> Add another deployment? N
  1. Create the Remote
$ gitkube remote create -f myremote.yaml
INFO[0000] remote myremote created                      
INFO[0000] waiting for remote url                       
INFO[0000] remote url: ssh://[email protected]/~/git/default-myremote 

  # add the remote to your git repo and push:
  git remote add myremote ssh://[email protected]/~/git/default-myremote
  git push myremote master

If the LoadBalancer IP for gitkubed is not ready yet, you might have to wait for a few seconds and try again. Follow the instructions yielded by the commands to add a new git remote to your repo called "myremote".

  1. Git push and deploy
$ git push myremote master