-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2a11406
commit 38b5d7a
Showing
20 changed files
with
2,420 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: devtron-operator | ||
appVersion: 0.3.0 | ||
description: Chart to configure and install Devtron. Devtron is a Kubernetes Orchestration system. | ||
keywords: | ||
- Devtron | ||
- Kubernetes | ||
- Orchestration | ||
- K8s | ||
- Deployment | ||
- argocd | ||
- Hyperion | ||
engine: gotpl | ||
version: 0.21.15 | ||
sources: | ||
- https://github.com/devtron-labs/charts | ||
maintainers: | ||
- email: [email protected] | ||
name: Prakarsh | ||
icon: https://s3-ap-southeast-1.amazonaws.com/devtron.ai/images/devtron-sqr-logo.png | ||
home: https://devtron.ai | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
|
||
[](https://discord.gg/72JDKy4) | ||
|
||
# Devtron Installation | ||
|
||
Devtron is an open source software delivery workflow for kubernetes written in go. It is designed as a self-serve platform for operationalizing and maintaining applications (AppOps) on kubernetes in a developer friendly way. | ||
|
||
## Introduction | ||
|
||
This chart bootstraps deployment of all required components for installation of [Devtron Platform](https://github.com/devtron-labs) on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. | ||
|
||
It packages third party components like | ||
|
||
- [Grafana](https://github.com/grafana/grafana) for displaying application metrics | ||
- [Argocd](https://github.com/argoproj/argo-cd/) for gitops | ||
- [Argo workflows](https://github.com/argoproj/argo) for CI | ||
- [Clair](https://github.com/quay/clair) & [Guard](https://github.com/guard/guard) for image scanning | ||
- [Kubernetes External Secrets](https://github.com/godaddy/kubernetes-external-secrets) for ingegrating with external secret management stores like [AWS Secrets Manager](https://aws.amazon.com/secrets-manager/) or [HashiCorp Vault](https://www.vaultproject.io/) | ||
- [Nats](https://github.com/nats-io) for event streaming | ||
- [Postgres](https://github.com/postgres/postgres) as datastore | ||
- Fork of [Argo Rollout](https://github.com/argoproj/argo-rollouts) | ||
|
||
## How to use it | ||
|
||
### Install with Helm | ||
|
||
This chart is currently not available on the official helm repository therefore you need to download it to install it. | ||
|
||
```bash | ||
$ git clone [https://github.com/devtron-labs/devtron-installation-script.git](https://github.com/devtron-labs/devtron-installation-script.git) | ||
$ cd devtron-installation-script/charts | ||
$ #modify values in values.yaml | ||
$ helm install devtron . -f values.yaml | ||
``` | ||
For more details about configuration see the [helm chart configuration](#configuration) | ||
|
||
### Install with kubectl | ||
|
||
If you don't want to install helm on your cluster and just want to use `kubectl` to install `devtron platform`, then please follow following steps: | ||
|
||
```bash | ||
$ git clone [https://github.com/devtron-labs/devtron-installation-script.git](https://github.com/devtron-labs/devtron-installation-script.git) | ||
$ cd devtron-installation-script/charts/template | ||
$ kubectl apply -n devtroncd -f charts/template/install.yaml | ||
$ # wait for it to finish | ||
$ #edit charts/template/configmap-secret.yaml | ||
$ kubectl apply -n devtroncd -f charts/template/configmap-secret.yaml | ||
$ kubectl apply -n devtroncd -f charts/template/devtron-installer.yaml | ||
``` | ||
### Access devtron dashboard | ||
|
||
devtron dashboard in now available at the `BASE_URL/dashboard`, where `BASE_URL` is same as provided in `values.yaml` in case of installation via helm chart OR provided in `charts/template/configmap-secret.yaml` in case of installation via kubectl. | ||
|
||
For login use username:`admin` and for password run command mentioned below. | ||
```bash | ||
$ kubectl -n devtroncd get secret devtron-secret -o jsonpath='{.data.ACD_PASSWORD}' | base64 -d | ||
``` | ||
### Configuration | ||
|
||
All parameters mentioned in the `values.yaml` are mandatory. | ||
|
||
First section is ***secrets.env*** and it has following properties | ||
| Parameter | Description | Default | | ||
|----------:|:------------|:--------| | ||
| **POSTGRESQL_PASSWORD*** | password for postgres database (required) | change-me | | ||
| **GIT_TOKEN** | git token for the gitops work flow, please note this is not for source code of repo and this token should have full access to create, delete, update repository (required) | | | ||
| **WEBHOOK_TOKEN** | If you want to continue using jenkins for CI then please provide this for authentication of requests (optional) | | | ||
|
||
Second section is ***configs*** and has following properties | ||
| Parameter | Description | Default | | ||
|----------:|:------------|:--------| | ||
| **BASE_URL_SCHEME** | either of http or https | http | | ||
| **BASE_URL** | url without scheme and trailing slash (required) `eg. devtron.ai` | `change-me` | | ||
| **DEX_CONFIG** | dex config if you want to integrate login with SSO (optional) for more information check [Argocd documentation](https://argoproj.github.io/argo-cd/operator-manual/user-management/) | | ||
| **GIT_PROVIDER** | git provider for storing config files for gitops, currently only GITHUB and GITLAB are supported | `GITHUB` | | | ||
| **GITLAB_NAMESPACE_ID** | if GIT_PROVIDER is GITLAB | | | ||
| **GITLAB_NAMESPACE_NAME** | if GIT_PROVIDER is GITLAB | | | ||
| **GIT_USERNAME** | git username for the GIT_PROVIDER | | | ||
| **GITHUB_ORGANIZATION** | if GIT_PROVIDER is GITHUB | | | ||
| **DEFAULT_CD_LOGS_BUCKET_REGION** | AWS region of bucket to store CD logs | | | ||
| **DEFAULT_CACHE_BUCKET** | AWS bucket to store docker cache | | | ||
| **DEFAULT_CACHE_BUCKET_REGION** | AWS region of cache bucket defined in previous step | | | ||
| **DEFAULT_BUILD_LOGS_BUCKET** | AWS bucket to store build logs | | | ||
| **CHARTMUSEUM_STORAGE_AMAZON_BUCKET** | AWS bucket to store charts | | | ||
| **CHARTMUSEUM_STORAGE_AMAZON_REGION** | AWS region for bucket defined in previous step to store charts | | | ||
| **EXTERNAL_SECRET_AMAZON_REGION** | AWS region for secret manager to pick | | | ||
| **PROMETHEUS_URL** | url of prometheus where all cluster data is stored, if this is wrong, you will not be able to see application metrics like cpu, ram, http status code, latency and throughput | | | ||
|
||
example of DEX_CONFIG is | ||
|
||
DEX_CONFIG: |- | ||
connectors: | ||
- type: oidc | ||
id: google | ||
name: Google | ||
config: | ||
issuer: https://accounts.google.com | ||
clientID: xxxxxxxx-qwwdsdsqsxxxxxxxxx.apps.googleusercontent.com | ||
clientSecret: fssdsdw121wwxssd | ||
redirectURI: <BASE_URL_SCHEME>://<BASE_URL>/api/dex/callback | ||
hostedDomains: | ||
- abc.com | ||
|
||
**Please Note:** | ||
Ensure that the cluster has access to the DEFAULT_CACHE_BUCKET, DEFAULT_BUILD_LOGS_BUCKET, CHARTMUSEUM_STORAGE_AMAZON_BUCKET and AWS secrets backends (SSM & secrets manager) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,172 @@ | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.3.0 | ||
creationTimestamp: null | ||
name: installers.installer.devtron.ai | ||
spec: | ||
group: installer.devtron.ai | ||
names: | ||
kind: Installer | ||
listKind: InstallerList | ||
plural: installers | ||
singular: installer | ||
scope: Namespaced | ||
versions: | ||
- name: v1alpha1 | ||
served: true | ||
storage: true | ||
schema: | ||
openAPIV3Schema: | ||
description: Installer is the Schema for the installers API | ||
properties: | ||
apiVersion: | ||
description: 'APIVersion defines the versioned schema of this representation | ||
of an object. Servers should convert recognized schemas to the latest | ||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | ||
type: string | ||
kind: | ||
description: 'Kind is a string value representing the REST resource this | ||
object represents. Servers may infer this from the endpoint the client | ||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
description: InstallerSpec defines the desired state of Installer | ||
properties: | ||
reSync: | ||
description: Rerun the installation script | ||
type: boolean | ||
url: | ||
description: URL of the BOM version to be installed | ||
type: string | ||
type: object | ||
status: | ||
description: InstallerStatus defines the observed state of Installer | ||
properties: | ||
current_spec_hash: | ||
type: string | ||
sync: | ||
description: SyncStatus is a comparison result of application spec and | ||
deployed application. | ||
properties: | ||
conditions: | ||
items: | ||
description: InstallerCondition contains details about current | ||
application condition | ||
properties: | ||
lastTransitionTime: | ||
description: LastTransitionTime is the time the condition | ||
was first observed. | ||
format: date-time | ||
type: string | ||
message: | ||
description: Message contains human-readable message indicating | ||
details about condition | ||
type: string | ||
type: | ||
description: Type is an application condition type | ||
type: string | ||
required: | ||
- message | ||
- type | ||
type: object | ||
type: array | ||
data: | ||
type: string | ||
health: | ||
properties: | ||
message: | ||
type: string | ||
status: | ||
description: Represents resource health status | ||
type: string | ||
type: object | ||
history: | ||
description: RevisionHistories is a array of history, oldest first | ||
and newest last | ||
items: | ||
description: RevisionHistory contains information relevant to | ||
an application deployment | ||
properties: | ||
deployStartedAt: | ||
description: DeployStartedAt holds the time the deployment | ||
started | ||
format: date-time | ||
type: string | ||
deployedAt: | ||
description: DeployedAt holds the time the deployment completed | ||
format: date-time | ||
type: string | ||
id: | ||
description: ID is an auto incrementing identifier of the | ||
RevisionHistory | ||
format: int64 | ||
type: integer | ||
revision: | ||
description: Revision holds the revision of the sync | ||
type: string | ||
source: | ||
description: ApplicationSource contains information about | ||
github repository, path within repository and target application | ||
environment. | ||
properties: | ||
url: | ||
type: string | ||
type: object | ||
required: | ||
- deployedAt | ||
- id | ||
- revision | ||
type: object | ||
type: array | ||
resources: | ||
items: | ||
description: ResourceStatus holds the current sync and health | ||
status of a resource | ||
properties: | ||
group: | ||
type: string | ||
health: | ||
properties: | ||
message: | ||
type: string | ||
status: | ||
description: Represents resource health status | ||
type: string | ||
type: object | ||
kind: | ||
type: string | ||
name: | ||
type: string | ||
namespace: | ||
type: string | ||
operation: | ||
type: string | ||
status: | ||
type: string | ||
version: | ||
type: string | ||
type: object | ||
type: array | ||
status: | ||
type: string | ||
url: | ||
description: URL of the BOM version pulled | ||
type: string | ||
required: | ||
- status | ||
type: object | ||
required: | ||
- current_spec_hash | ||
- sync | ||
type: object | ||
type: object | ||
status: | ||
acceptedNames: | ||
kind: "" | ||
plural: "" | ||
conditions: [] | ||
storedVersions: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
1. Run the following command to get the default admin password. Default username is admin | ||
|
||
kubectl -n devtroncd get secret devtron-secret -o jsonpath='{.data.ACD_PASSWORD}' | base64 -d | ||
{{- if $.Values.installer.modules }} | ||
|
||
2. You can watch the progress of Devtron microservices installation by the following command | ||
|
||
kubectl -n devtroncd get installers installer-devtron -o jsonpath='{.status.sync.status}' | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: app-sync-job-{{ randAlphaNum 5 | lower }} | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: chart-sync | ||
image: quay.io/devtron/chart-sync:1227622d-132-3775 | ||
env: | ||
- name: PG_ADDR | ||
value: postgresql-postgresql.devtroncd | ||
- name: PG_DATABASE | ||
value: orchestrator | ||
- name: PG_USER | ||
value: postgres | ||
envFrom: | ||
- secretRef: | ||
name: devtron-secret | ||
restartPolicy: OnFailure | ||
backoffLimit: 4 | ||
activeDeadlineSeconds: 120 | ||
--- | ||
apiVersion: batch/v1 | ||
kind: CronJob | ||
metadata: | ||
name: app-sync-cronjob | ||
annotations: | ||
"helm.sh/resource-policy": keep | ||
spec: | ||
schedule: "0 19 * * *" | ||
jobTemplate: | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: chart-sync | ||
image: quay.io/devtron/chart-sync:1227622d-132-3775 | ||
env: | ||
- name: PG_ADDR | ||
value: postgresql-postgresql.devtroncd | ||
- name: PG_DATABASE | ||
value: orchestrator | ||
- name: PG_USER | ||
value: postgres | ||
envFrom: | ||
- secretRef: | ||
name: devtron-secret | ||
restartPolicy: Never | ||
backoffLimit: 4 |
Oops, something went wrong.