Coder Social home page Coder Social logo

boundless's Introduction

Boundless - Tech Preview

The only ZeroOps Container Platform for Modern Apps. A collaborative ‘design and run’ platform for bespoke open source solutions.

Documentation

If you are a Mirantis employee, you can learn about boundless in our wiki. We are in the process of converting the wiki to a markdown website that will be available as part of this repo. The website is available here.

Editing the website

It is currently possible to view and edit the documentation website locally. See here for more details.

Quick Start

Pre-requisite

  1. Install Boundless CLI binary:
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/mirantiscontainers/boundless/main/script/install.sh)"
    This will install bctl to /usr/local/bin. See here for all releases.

Bootstrap kind cluster and install add-ons

  1. Install Kind: https://kind.sigs.k8s.io/docs/user/quick-start/

  2. Generate a sample blueprint file:

    bctl init --kind > blueprint.yaml

    This will create a blueprints file blueprint.yaml with a kind cluster definition, a core ingress component and an addOn. See a sample here

  3. Deploy the blueprint

    bctl apply --config blueprint.yaml

    Use this file to connect to the cluster.

  4. Add wordpress addon to the blueprint.yaml:

    - name: wordpress
      kind: chart
      enabled: true
      namespace: wordpress
      chart:
        name: wordpress
        repo: https://charts.bitnami.com/bitnami
        version: 18.0.11

    Update your cluster with the updated blueprint:

    bctl update --config blueprint.yaml
  5. Delete the cluster:

    bctl reset --config blueprint.yaml

Install add-on components on an existing kubernetes cluster

  1. Install Boundless Operator
    kubectl apply -f https://raw.githubusercontent.com/mirantiscontainers/boundless/main/deploy/static/boundless-operator.yaml
  2. Wait for boundless operator to be ready
    kubectl get deploy -n boundless-system
    NAME                                    READY   UP-TO-DATE   AVAILABLE   AGE
    boundless-operator-controller-manager   1/1     1            1           33s
  3. Create a blueprint file blueprint.yaml:
    apiVersion: boundless.mirantis.com/v1alpha1
    kind: Blueprint
    metadata:
      name: boundless-cluster
    spec:
     components:
       addons:
         - name: example-server
           kind: chart
           enabled: true
           namespace: default
           chart:
             name: nginx
             repo: https://charts.bitnami.com/bitnami
             version: 15.1.1
             values: |
               "service":
                 "type": "ClusterIP"
    The above example installs a addon by specifying a helm chart
  4. Apply the blueprint
    kubectl apply -f blueprint.yaml
  5. After a while, the components specified in the blueprint will be installed:
    kubectl get deploy
    NAME    READY   UP-TO-DATE   AVAILABLE   AGE
    nginx   1/1     1            1           35s

Bootstrap k0s cluster and install add-ons on Amazong VM

Prerequisites

Ensure that following are installed on the system:

Create virtual machines on AWS

There are terraform scripts in the example/ directory that can be used to create machines on AWS.

Refer to the example TF scripts: https://github.com/mirantiscontainers/boundless-cli/tree/main/example/aws-tf

  1. cd example/aws-tf
  2. Create a terraform.tfvars file with the content similar to:
    cluster_name = "rs-boundless-test"
    controller_count = 1
    worker_count = 1
    cluster_flavor = "m5.large"
    
  3. terraform init
  4. terraform apply
  5. terraform output --raw bop_cluster > ./blueprint.yaml

Install Boundless Operator on k0s

  1. Generate a basic blueprint file:

    bctl init > blueprint.yaml

    This will create a blueprints file blueprint.yaml with k0s specific kubernetes definition and addons that get installed in specific namespace. See a sample here

  2. Now, edit the blueprint.yaml file to set the spec.kubernetes.infra.hosts from the output of terraform output --raw bop_cluster.

    The spec.kubernetes.infra.hosts section should look similar to:

    spec:
      kubernetes:
        provider: k0s
        version: 1.27.4+k0s.0
        infra:
          hosts:
          - ssh:
              address: 52.91.89.114
              keyPath: ./example/aws-tf/aws_private.pem
              port: 22
              user: ubuntu
            role: controller
          - ssh:
              address: 10.0.0.2
              keyPath: ./example/aws-tf/aws_private.pem
              port: 22
              user: ubuntu
            role: worker
  3. Create the cluster:

    bctl apply --config blueprint.yaml
  4. Update the cluster by modifying blueprint.yaml and then running:

    bctl update --config blueprint.yaml
  5. Delete the cluster:

    bctl reset --config blueprint.yaml
  6. Delete virtual machines:

    cd example/aws-tf
    terraform destroy --auto-approve

Boundless Blueprints

Core Components

Currently, you can replace the ingress controller from ingress-nginx to kong by updating the blueprint.yaml file:

spec:
 components:
   core:
     ingress:
       enabled: true
       provider: kong # ingress-nginx, kong, etc.

If the cluster is already deployed, run bctl reset to destroy the cluster and then run bctl apply to recreate it.

Add-ons

Update the blueprint.yaml file to add add-ons to the cluster. The add-ons are defined in the spec .components.addons section.

Any public Helm chart can be used as an add-on.

Use the following configuration to add the grafana as an add-on:

spec:
 components:
   addons:
   - name: my-grafana
     enabled: true
     kind: chart
     namespace: monitoring
     chart:
       name: grafana
       repo: https://grafana.github.io/helm-charts
       version: 6.58.7
       values: |
         ingress:
           enabled: true

and then run bctl update to update the cluster.

Sample Blueprints

Sample Blueprint for Kind cluster:

apiVersion: boundless.mirantis.com/v1alpha1
kind: Blueprint
metadata:
  name: kind-cluster
spec:
  kubernetes:
    provider: kind
  components:
    core:
      ingress:
        enabled: true
        provider: ingress-nginx
        config:
          controller:
            service:
              nodePorts:
                http: 30000
                https: 30001
              type: NodePort
    addons:
      - name: example-server
        kind: chart
        enabled: true
        namespace: default
        chart:
          name: nginx
          repo: https://charts.bitnami.com/bitnami
          version: 15.1.1
          values: |
            "service":
              "type": "ClusterIP"

Sample Blueprint for k0s cluster:

apiVersion: boundless.mirantis.com/v1alpha1
kind: Blueprint
metadata:
  name: boundless-cluster
spec:
  kubernetes:
    provider: k0s
    version: 1.27.4+k0s.0
    infra:
      hosts:
        - ssh:
            address: 52.91.89.114
            keyPath: ./example/aws-tf/aws_private.pem
            port: 22
            user: ubuntu
            role: controller
        - ssh:
            address: 10.0.0.2
            keyPath: ./example/aws-tf/aws_private.pem
            port: 22
            user: ubuntu
          role: worker
    components:
      core:
        ingress:
          enabled: true
          provider: ingress-nginx
          config:
            controller:
              service:
                nodePorts:
                  http: 30000
                  https: 30001
                type: NodePort
      addons:
        - name: example-server
          kind: chart
          enabled: true
          namespace: default
          chart:
            name: nginx
            repo: https://charts.bitnami.com/bitnami
            version: 15.1.1
            values: |2
              "service":
                "type": "ClusterIP"

boundless's People

Contributors

moshiurh avatar nwneisen avatar ranyodh avatar sakshisharma84 avatar vivek 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.