Added Image Registry and ChaosHub docs (#79)

* Added image registry and ChaosHub docs

Signed-off-by: Amit Kumar Das <amit@chaosnative.com>

* Minor changes

Signed-off-by: Amit Kumar Das <amit@chaosnative.com>

* Added before you begin and learn more section in image registry

Signed-off-by: Amit Kumar Das <amit@chaosnative.com>

* Minor changes

Signed-off-by: Amit Kumar Das <amit@chaosnative.com>

Co-authored-by: Vedant Shrotria <40681425+Jonsy13@users.noreply.github.com>
This commit is contained in:
Amit Kumar Das 2021-08-12 10:51:44 +05:30 committed by GitHub
parent 897e35c5b9
commit 8b81843382
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 140 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

View File

@ -4,4 +4,87 @@ title: ChaosHub
sidebar_label: ChaosHub sidebar_label: ChaosHub
--- ---
## Coming soon ---
ChaosHub allows you to orchestrate workflows from the Public **[ChaosHub](http://hub.litmuschaos.io/)** or an alternate source for the Experiments (basically, a **[fork](https://github.com/litmuschaos/chaos-charts)** of the public hub with custom experiments).
## Prerequisites
The following are the prerequisites for creating a Chaos Workflow:
- [ChaosCenter](chaos-center)
- [ChaosAgent](agent)
- Fork of [Chaos-Charts](https://github.com/litmuschaos/chaos-charts) repository
:::note
An active internet connection is required to clone the git repository for the first time installation.
:::
## Connecting a Git repository using ChaosHub
With ChaosHub, you can construct chaos workflows by selecting, tuning and sequencing different experiments together from their connected ChaosHubs.
You can make changes in your forked repositories and sync it with the Portal to get the latest changes from the fork.
By default, a Public ChaosHub is provided when the ChaosCenter is installed for the first time.
<img src={require('../assets/concepts/chaoshub/chaoshub-default.png').default} width="800" />
### 1. Connect a Public Git Repository
You can connect to a public Git repository by simply providing the following details:
- Hub Name
- Git URL of the forked repository
- Branch Name
<img src={require('../assets/concepts/chaoshub/chaoshub-add-public.png').default} width="800" />
### 2. Connect a Private Git Repository
To add a Private Hub, you need provide the Hub name, Git URL of the forked repository and the Branch name similar to that of Public Hub and the repository can be connected by 2 methods:
<img src={require('../assets/concepts/chaoshub/chaoshub-add-private.png').default} width="800" />
#### a. Access Token
Personal Access Tokens are used as an alternative to the password for authentication to Git services.
#### b. SSH Key
Just like the Access Token , SSH keys are used for the authentication. These keys come in pairs, a public key that is shared with the Git Services and a private key that is stored with you.
SSH link of the repository should be provided if you select this method.
<img src={require('../assets/concepts/chaoshub/chaoshub-after-add.png').default} width="800" />
## Syncing a ChaosHub
If some changes are made into the git repository, you can reflect these changes in the hub by selecting the **Refresh Hub** option from the ChaosHub card.
## Editing a ChaosHub
To make changes in a hub like changing the name, branch, access token etc, you can select the **Edit Hub** option from the ChaosHub card.
## Workflows and Experiments in a ChaosHub
### 1. View the PreDefined Workflows
After connecting a ChaosHub, you can view the different pre-defined workflows present in the ChaosHub.
<img src={require('../assets/concepts/chaoshub/chaoshub-predefined-wf.png').default} width="800" />
### 2. View the Chaos-Charts
Similarly, you can view the different charts and the experiment. These charts are sorted according to different categories like generic, aws, azure, kube-components etc.
<img src={require('../assets/concepts/chaoshub/chaoshub-chaos-charts.png').default} width="800" />
### 3. View the experiment details
You can select one of the chart and can examine the experiment details.
The experiment page consists of all the important details like the description of the experiment, a tutorial video, the maintainer of the experiment etc.
You can also find experiment yaml link, RBAC link and the Chaos Engine yaml link of the experiment.
These yaml links are required for the creation of Custom Chaos Workflows.
<img src={require('../assets/concepts/chaoshub/chaoshub-exp-details.png').default} width="800" />
## Disconnect a ChaosHub
To remove a ChaosHub from a project, you can select the **Disconnect Hub** option from the ChaosHub card.
## Summary
ChaosHubs are basically a collection of different clones of the Chaos-Charts repository, which consists of a variety of experiments and pre-defined workflows. You can use a ChaosHub to construct a custom chaos workflow and tune it according to the use-case. These ChaosHubs can also be synced with the latest changes. New experiments and pre-defined workflows can also be added in the repository which can be directly used in the ChaosCenter.
## Resources
<iframe width="560" height="315" src="https://www.youtube.com/embed/qO-lfmorcus" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
## Learn More
- [What is a Chaos Workflow](chaos-workflow)
- [Examine the ChaosResult](chaos-result)

View File

@ -3,5 +3,60 @@ id: image-registry
title: Using different Image Registries in a Workflow title: Using different Image Registries in a Workflow
sidebar_label: Using different Image Registries sidebar_label: Using different Image Registries
--- ---
---
A container image registry can be defined as a collection of repositories that store container image.
These can be either public or private. Few of the container image registries are Docker, Red Hat Quay, Google Container Registry.
By default LitmusChaos uses DockerHub for managing the different images. These images are then used in Chaos Workflows. Few images that are used in the Litmus workflows are `litmuschaos:k8s`, `litmuschaos:litmus-checker` etc.
With ChaosCenter, you get the privilege to use your own/custom image registries for Chaos Workflows.
## Before you begin
To understand the concept of Image Registry, make sure you are aware of [Chaos Workflow](../concepts/chaos-workflow) and the different image registries that are used in it.
## Steps to Update Chaos Workflow Image Registry
To updated the Chaos Workflow Image Registry, you can go to Settings in ChaosCenter. In settings, there will be tab named Image Registry. On clicking the Image Registry tab, you can see that the default Registry server is `docker.io`, Registry name is `litmuschaos` and it is a Public registry.
<img src={require('../assets/user-guides/image-registry/img-registry-tab.png').default} width="800" />
<br/><br/>
To update this, click on the `Use Custom Values` option and provide the following details:
1. Registry Server
2. Registry Name
3. Registry Type `Public/Private`
<img src={require('../assets/user-guides/image-registry/img-registry-update.png').default} width="800" />
<br/><br/>
If the Registry Type is `Private`, make sure to provide the secret and the namespace where the secret is present.
Once the details are provided, click on the `Save Changes` button and you can see the updated Image Registry changes.
<img src={require('../assets/user-guides/image-registry/img-registry-updated.png').default} width="800" />
<br/><br/>
Now while scheduling a workflow, the image registry changes will be visible. Here's the code snippet from a Chaos Workflow after the image registry change.
```yaml
- name: install-application
container:
image: docker.io/testing-reg/litmus-app-deployer:latest
args:
- -namespace=bank
- -typeName=resilient
- -operation=apply
- -timeout=400
- -app=bank-of-anthos
- -scope=cluster
- name: install-chaos-experiments
container:
image: docker.io/testing-reg/k8s:latest
```
## Learn More
- [What is a Chaos Workflow](../concepts/chaos-workflow)
- [What is ChaosCenter](../concepts/chaos-center)
## Coming soon