Jump to content

Local-charts/Tutorial

From Wikitech

To better understand how to contribute to the local-charts environment, let's walk through it together.

In the walkthrough below we will show how to add a service that already has a helm chart to be deployed using local-charts.

Let's try adding the Blubberoid service from [1]. Blubberoid creates a Dockerfile based on a yaml configuration file. Adding it to local-charts will let us run Blubberoid in Minikube.

Goal

Deploy the Blubberoid service in Minikube by adding it to local-charts.

Steps

Clone the local-charts repository

We'll be editing files in the local-charts repo: [2] Run the installation script by running `make install` from within the repo's root directory.

Update requirements.yaml

First, we need to tell Helm that we require an additional chart in our deployment. Update helm/requirements.yaml like so: Updating helm/requirements.yaml

Update values.example.yaml

Add blubberoid to the global enabled property:

Editing values.example.yaml

Next, create a Blubberoid property in order to configure the Blubberoid chart. Possible values to configure can be seen in the Blubberoid chart in deployment-charts repo [3]. For example, perhaps we want to enable Blubberoid's policy feature:

Editing values.example.yaml

Now we're ready to deploy!

Run a deployment

First, run `make start` from within the local-charts root to start our Minikube cluster. Second, run `make deploy values=values.example.yaml`

Blubberoid should now be deployed to Minikube!

Deploying

Check it's running by running `kubectl get pods`:

The running pods

Results

We can now try using Blubberoid! first, get your minikube's IP by `minikube ip`, and the 5-digit blubberoid port by `kubectl get svc`. Now try Blubberoid:

Trying Blubberoid

Clean up

You can delete your deployments by running `make undeploy` from the local-charts root. Similarly, running `make stop` will stop the Minikube cluster