GithubHelp home page GithubHelp logo

doytsujin / wks-quickstart-firekube Goto Github PK

View Code? Open in Web Editor NEW

This project forked from weaveworks/wks-quickstart-firekube

0.0 1.0 0.0 298 KB

Example configuration to create Kubernetes clusters powered by ignite and gitops

JavaScript 19.44% Shell 80.56%

wks-quickstart-firekube's Introduction

Firekube

Firekube is a Kubernetes cluster working on top of ignite and firecracker. Firekube clusters are operated with GitOps.

ignite and firecracker only work on Linux as they need KVM. Fortunately we will also work on macOS using footloose: the Kubernetes nodes are then running inside containers.

Creating a Firekube cluster

Prerequisites: docker, git, kubectl 1.14+.

  1. Fork this repository.

  2. Clone your fork and cd into it. Use the SSH git URL as the script will push an initial commit to your fork:

    export user="" # Your GitHub handle or org
    
    git clone [email protected]:$user/wks-quickstart-firekube.git
    cd wks-quickstart-firekube
  3. Start the cluster:

    ./setup.sh

    This step will take several minutes.

    Please note that the setup.sh script will detect which OS you're on. If it's macOS, the script will automatically set backend: docker inside config.yaml. This config is to start the cluster in containers as there is no KVM on macOS. However, Firekube on Linux will run either with backend: ignite (ignite VMs) or backend: docker (containers). So the setup.sh script won't touch the backend value inside config.yaml if you're on Linux. In case you started Firekube (in containers) on macOS then switched to try it on Linux, please make sure that the backend value is set to backend: ignite so that you can start the cluster on ignite / firecracker VMs.

  4. Export the KUBECONFIG environment variable as indicated at the end of the installation:

    export KUBECONFIG=/home/damien/.wks/weavek8sops/example/kubeconfig

Enjoy your Kubernetes cluster!

$ kubectl get nodes
NAME               STATUS   ROLES    AGE     VERSION
67bb6c4812b19ce4   Ready    master   3m42s   v1.14.1
a5cf619fa058882d   Ready    <none>   75s     v1.14.1

Watch GitOps in action

Now that we have a cluster installed, we can commit Kubernetes objects to the git repository and have them appear in the cluster. Let's add podinfo, an example Go microservice, to the cluster.

kubectl apply --dry-run -k github.com/stefanprodan/podinfo//kustomize -o yaml > podinfo.yaml
git add podinfo.yaml
git commit -a -m 'Add podinfo Deployment'
git push

A few seconds later, you should witness the apparition of a podinfo pod in the cluster:

$ kubectl get pods
NAME                       READY   STATUS    RESTARTS   AGE
podinfo-677768c755-z76xk   1/1     Running   0          30s

To view podinfo web UI:

  1. Expose podinfo locally:

    kubectl port-forward deploy/podinfo 9898:9898
    
  2. Point your browser to http://127.0.0.1:9898:

    podinfo

Deleting a Firekube cluster

Run:

./cleanup.sh

Using a private git repository with firekube

To use a private git repository instead of a fork of wks-quickstart-firekube:

  1. Create a private repository and push the wks-quickstart-firekube master branch there. Use the SSH git URL when cloning the private repository:

    git clone [email protected]:$user/$repository.git
    cd $repository
    git remote add quickstart [email protected]:weaveworks/wks-quickstart-firekube.git
    git fetch quickstart
    git merge quickstart/master
    git push
    
  2. Create an SSH key pair:

    ssh-keygen -t rsa -b 4096 -C "[email protected]" -f deploy-firekube  -N ""
  3. Upload the deploy key to your private repository (with read/write access):

    deploy key upload

  4. Start the cluster:

    ./setup.sh --git-deploy-key  ./deploy-firekube

Getting Help

If you have any questions about, feedback for or problems with wks-quickstart-firekube:

Weaveworks follows the CNCF Code of Conduct. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting a Weaveworks project maintainer, or Alexis Richardson ([email protected]).

Your feedback is always welcome!

License

Apache 2.0

wks-quickstart-firekube's People

Contributors

dlespiau avatar chanwit avatar stealthybox avatar mflendrich avatar jrryjcksn avatar alexellis avatar dimitropoulos avatar sbernheim 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.