All Projects → jnsgruk → hello-kubecon

jnsgruk / hello-kubecon

Licence: Apache-2.0 license
A Charmed Operator demonstration for Operator Day 2021, hosted by Canonical

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to hello-kubecon

docs
Juju documentation, edited on https://discourse.juju.is, and published on https://juju.is/docs
Stars: ✭ 21 (+50%)
Mutual labels:  charm, juju, canonical
charm
A [ functional stack ] based language.
Stars: ✭ 26 (+85.71%)
Mutual labels:  charm
wptrainingteam.github.io
WordPress.org Training Team Home for Lists of Lesson Plans and Workshop Ideas
Stars: ✭ 39 (+178.57%)
Mutual labels:  training
HackerOne-Lessons
Transcribed video lessons of HackerOne to pdf's
Stars: ✭ 104 (+642.86%)
Mutual labels:  training
restful-booker
A free to use Web API for practising API testing on
Stars: ✭ 104 (+642.86%)
Mutual labels:  training
shortest-tutorial-ever
A list of the shortest tutorials ever.
Stars: ✭ 14 (+0%)
Mutual labels:  training
EffcientNetV2
EfficientNetV2 implementation using PyTorch
Stars: ✭ 94 (+571.43%)
Mutual labels:  training
sagemaker-xgboost-container
This is the Docker container based on open source framework XGBoost (https://xgboost.readthedocs.io/en/latest/) to allow customers use their own XGBoost scripts in SageMaker.
Stars: ✭ 93 (+564.29%)
Mutual labels:  training
studio-lab-examples
Example notebooks for working with SageMaker Studio Lab. Sign up for an account at the link below!
Stars: ✭ 319 (+2178.57%)
Mutual labels:  training
csharpworkshop
Workshop content on Learning C# on Linux using .NET Core
Stars: ✭ 33 (+135.71%)
Mutual labels:  training
ARGoal
Get more goals. | Virtual Goals & Goal Distance | App Doctor Hu
Stars: ✭ 14 (+0%)
Mutual labels:  training
authlab
A lab to play with authentication and authorisation problems
Stars: ✭ 80 (+471.43%)
Mutual labels:  training
cytrone
CyTrONE: Integrated Cybersecurity Training Framework
Stars: ✭ 72 (+414.29%)
Mutual labels:  training
pytorch-accelerated
A lightweight library designed to accelerate the process of training PyTorch models by providing a minimal, but extensible training loop which is flexible enough to handle the majority of use cases, and capable of utilizing different hardware options with no code changes required. Docs: https://pytorch-accelerated.readthedocs.io/en/latest/
Stars: ✭ 125 (+792.86%)
Mutual labels:  training
rankpruning
🧹 Formerly for binary classification with noisy labels. Replaced by cleanlab.
Stars: ✭ 81 (+478.57%)
Mutual labels:  training
adsy-trainings
Workshop and training materials
Stars: ✭ 13 (-7.14%)
Mutual labels:  training
repo-template
Template for creating lesson plan repos, including the lesson plan template. Fork this or use it as a template to create new lesson plans.
Stars: ✭ 15 (+7.14%)
Mutual labels:  training
Crossbow
Crossbow: A Multi-GPU Deep Learning System for Training with Small Batch Sizes
Stars: ✭ 52 (+271.43%)
Mutual labels:  training
docker-dca
Docker DCA (Docker Certified Associate) exam preparation guide
Stars: ✭ 26 (+85.71%)
Mutual labels:  training
operator
Pure Python operator framework.
Stars: ✭ 201 (+1335.71%)
Mutual labels:  juju

Operator Day 2021 Demo Charm

Contents

Overview
Quickstart
Development Setup
Build and Deploy Locally
Testing
Get Help & Community
More Information/Related

Overview

This charm is a demonstration of a charm implemeting the sidecar pattern used during Operator Day 2021. You can grab the slides from the demo here.

The charm is written using the Charmed Operator Framework. It deploys gosherve, relying upon the charm container to populate a shared volume with a simple landing-page style website and configure the app before it is started.

Slides for the demo are available and there is a supporting Github Gist that contains copy-and- pastable content from the slide deck.

The finished charm is published on Charmhub.

The charm will:

  • Deploy a container running gosherve
  • Fetch a website from Github
  • Place the downloaded file in a storage volume
  • Expose a redirect-map config item to configure gosherve redirects
  • Expose a pull-site action to pull the latest version of the test site
  • Utilise an ingress relation using the nginx-ingress-integrator library

Each branch of this repository represents a different stage from the demonstration:

Quickstart

Assuming you already have Juju installed and bootstrapped on a cluster (if you do not, see the next section):

# Deploy the charm
$ juju deploy hello-kubecon
# Deploy the ingress integrator
$ juju deploy nginx-ingress-integrator
# Relate our app to the ingress
$ juju relate hello-kubecon nginx-ingress-integrator
# Add an entry to /etc/hosts
$ echo "127.0.1.1 hello-kubecon" | sudo tee -a /etc/hosts
# Wait for the deployment to complete
$ watch -n1 --color juju status --color

You should be able to visit http://hello-kubecon in your browser.

Development Setup

To set up a local test environment with MicroK8s:

# Install MicroK8s
$ sudo snap install --classic microk8s
# Wait for MicroK8s to be ready
$ sudo microk8s status --wait-ready
# Enable features required by Juju controller & charm
$ sudo microk8s enable storage dns ingress
# (Optional) Alias kubectl bundled with MicroK8s package
$ sudo snap alias microk8s.kubectl kubectl
# (Optional) Add current user to 'microk8s' group
# This avoid needing to use 'sudo' with the 'microk8s' command
$ sudo usermod -aG microk8s $(whoami)
# Activate the new group (in the current shell only)
# Log out and log back in to make the change system-wide
$ newgrp microk8s
# Install Charmcraft
$ sudo snap install charmcraft
# Install juju
$ sudo snap install --classic juju
# Bootstrap the Juju controller on MicroK8s
$ juju bootstrap microk8s micro
# Add a new model to Juju
$ juju add-model development

Build and Deploy Locally

# Clone the charm code
$ git clone https://github.com/jnsgruk/hello-kubecon && cd hello-kubecon
# Build the charm package
$ charmcraft pack
# Deploy!
$ juju deploy ./hello-kubecon.charm --resource gosherve-image=jnsgruk/gosherve:latest
# Deploy the ingress integrator
$ juju deploy nginx-ingress-integrator
# Relate our app to the ingress
$ juju relate hello-kubecon nginx-ingress-integrator
# Add an entry to /etc/hosts
$ echo "127.0.1.1 hello-kubecon" | sudo tee -a /etc/hosts
# Wait for the deployment to complete
$ watch -n1 --color juju status --color

You should be able to visit http://hello-kubecon in your browser.

Testing

# Clone the charm code
$ git clone https://github.com/jnsgruk/hello-kubecon && cd hello-kubecon
# Install python3-virtualenv
$ sudo apt update && sudo apt install -y python3-virtualenv
# Create a virtualenv for the charm code
$ virtualenv venv
# Activate the venv
$ source ./venv/bin/activate
# Install dependencies
$ pip install -r requirements-dev.txt
# Run the tests
$ ./run_tests

Get Help & Community

If you get stuck deploying this charm, or would like help with charming generally, come and join the charming community!

More Information/Related

Below are some links related to this demonstration:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].