-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add artifacts view, fix console rendering * Add spinning icon to build button to indicate long running tasks * Adding helm chart, still certs to be finished * Updating config * Temporarely updated plugin url to point to staging * Updating cerfiticates and issuers * Updating plugin dockerfile * Add circle ci config * add +x to build.sh * Finished updating certificates * Removing access token for digital ocean * Fixing tags and ports * change default nginx port * Changes to run locally * add alert component * cargo-contract service.js tested with Mocha framework * added tests for contract manager * All tests done except asserts for cargoContractManager.build * Tested whole backend flow * Reverted all config values * added pictures for readme update * Update README.md * Update README.md * Adding CD to cluster (#9) * Adding first instance of helm publish config * Fixing typo in config * Removing parameters * Adding permissions to scripts for cluster * Adding deploy script * Updating build workflow * Updating config * Removing circleci config * Adding debug option * Adding branch extraction * Adding branch extraction * Updating workflow * Reducing jobs * Updating build * Removing uses * Removing typo * Adding checkout * Fixing typo * Changing chart name * Updating chart path * Changing helm path * Updating namespace config * Adding hook to automatic deployment * Adding permissions to deploy file * Adding environments to json * Updating imagePullPolicy * Moving cert to chart * WIP: Adding stress testing * Feature kubernetes ci (#11) * Adding first instance of helm publish config * Fixing typo in config * Removing parameters * Adding permissions to scripts for cluster * Adding deploy script * Updating build workflow * Updating config * Removing circleci config * Adding debug option * Adding branch extraction * Adding branch extraction * Updating workflow * Reducing jobs * Updating build * Removing uses * Removing typo * Adding checkout * Fixing typo * Changing chart name * Updating chart path * Changing helm path * Updating namespace config * Adding hook to automatic deployment * Adding permissions to deploy file * Adding environments to json * Updating imagePullPolicy * Moving cert to chart * WIP: Adding stress testing * Adding basic stress testing to script * Removing venv Co-authored-by: Darko Macesic <[email protected]> Co-authored-by: Jakov Buratovic <[email protected]>
- Loading branch information
1 parent
22d2610
commit 46b6113
Showing
95 changed files
with
2,240 additions
and
236 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,65 @@ | ||
# Canary release using track=canary. Release a few pods that will be served by | ||
# the stable chart service. | ||
# canary: | ||
# production_environment: true | ||
# required_contexts: ["build"] | ||
# environment: production | ||
# description: 'Canary' | ||
# payload: | ||
# value_files: ["./config/production.yml", "./config/_common.yml"] | ||
# release: production-ink | ||
# namespace: ink | ||
# track: canary | ||
# values: | ||
# replicaCount: 1 | ||
|
||
# Deployment to a production environment is kicked off manually. This actually | ||
# runs two deployment, one is to remove the canary pods if it exists and the | ||
# other deploys to production. | ||
production: | ||
production_environment: true | ||
required_contexts: ["build"] | ||
environment: production | ||
description: 'Production' | ||
payload: | ||
value_files: ["./config/production.yml", "./config/_common.yml"] | ||
# Remove the canary deployment if it exists when doing a full prod deploy. | ||
remove_canary: true | ||
release: production-ink | ||
namespace: ink | ||
track: stable | ||
values: | ||
replicaCount: 1 | ||
|
||
# Automatic deployment to a staging environment on every push to master. | ||
staging: | ||
auto_deploy_on: refs/heads/master | ||
required_contexts: ["build"] | ||
environment: staging | ||
description: 'Staging' | ||
payload: | ||
value_files: ["./config/staging.yml", "./config/_common.yml"] | ||
release: staging-ink | ||
namespace: ink | ||
track: stable | ||
values: | ||
replicaCount: 1 | ||
|
||
# # Review environments can be triggered with /deploy review inside a pull | ||
# # request. | ||
# review: | ||
# # Set the transient environment flag to let GitHub and deliverybot know that | ||
# # this environment should be destroyed when the PR is closed. | ||
# transient_environment: true | ||
# production_environment: false | ||
# required_contexts: ["build"] | ||
|
||
# environment: pr${{ pr }} | ||
# description: 'Review' | ||
# payload: | ||
# value_files: ["./config/review.yml", "./config/_common.yml"] | ||
# release: review-myapp-${{ pr }} | ||
# namespace: example-helm | ||
# track: stable | ||
# values: | ||
# replicaCount: 1 |
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,16 @@ | ||
name: 'Push' | ||
on: ['push'] | ||
|
||
jobs: | ||
build: | ||
runs-on: 'ubuntu-latest' | ||
steps: | ||
- uses: 'actions/checkout@v1' | ||
- name: 'Run build scripts' | ||
run: 'CIRCLE_BRANCH=${GITHUB_REF##*/} scripts/build.sh' | ||
env: | ||
DOCKER_USER: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASS: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: 'Trigger deployment' | ||
run: scripts/deploy.sh | ||
|
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: 'Deploy' | ||
on: ['deployment'] | ||
|
||
jobs: | ||
deployment: | ||
runs-on: 'ubuntu-latest' | ||
steps: | ||
- name: 'Checkout' | ||
uses: 'actions/checkout@v1' | ||
- name: 'Deploy' | ||
# Parameters are pulled directly from the GitHub deployment event so the | ||
# configuration for the job here is very minimal. | ||
uses: 'deliverybot/helm@master' | ||
with: | ||
token: '${{ github.token }}' | ||
secrets: '${{ toJSON(secrets) }}' | ||
version: '${{ github.sha }}' | ||
chart: 'kubernetes/ink-network' | ||
env: | ||
KUBECONFIG_FILE: '${{ secrets.KUBECONFIG }}' |
This file was deleted.
Oops, something went wrong.
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,22 @@ | ||
name: PRCleanup | ||
on: | ||
pull_request: | ||
types: [closed] | ||
|
||
jobs: | ||
deployment: | ||
runs-on: 'ubuntu-latest' | ||
steps: | ||
- name: 'Deploy' | ||
uses: 'deliverybot/helm@v1' | ||
with: | ||
# Task remove means to remove the helm release. | ||
task: 'remove' | ||
release: 'review-ink-${{ github.event.pull_request.number }}' | ||
version: '${{ github.sha }}' | ||
track: 'stable' | ||
chart: 'ink' | ||
namespace: 'ink' | ||
token: '${{ github.token }}' | ||
env: | ||
KUBECONFIG_FILE: '${{ secrets.KUBECONFIG }}' |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.idea | ||
.vscode | ||
node_modules | ||
**/storage |
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
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,7 @@ | ||
secrets: | ||
- name: API_KEY | ||
value: '${{ secrets.API_KEY }}' | ||
|
||
# Example image pull secrets: | ||
# imagePullSecrets: | ||
# - name: regcred |
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,3 @@ | ||
env: | ||
- name: ENVIRONMENT | ||
value: production |
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,3 @@ | ||
env: | ||
- name: ENVIRONMENT | ||
value: staging |
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 |
---|---|---|
@@ -1,24 +1,24 @@ | ||
version: "3" | ||
services: | ||
plugin: | ||
container_name: plugin | ||
build: | ||
context: ./plugin | ||
dockerfile: Dockerfile | ||
ports: | ||
- "3000:3000" | ||
networks: | ||
- ink-remix-dev | ||
server: | ||
container_name: server | ||
build: | ||
context: ./server | ||
dockerfile: Dockerfile | ||
ports: | ||
- "65520:65520" | ||
networks: | ||
- ink-remix-dev | ||
volumes: | ||
- ./storage:/usr/src/app/storage | ||
plugin: | ||
container_name: plugin | ||
build: | ||
context: ./plugin | ||
dockerfile: Dockerfile | ||
ports: | ||
- "3000:3000" | ||
networks: | ||
- ink-network | ||
server: | ||
container_name: server | ||
build: | ||
context: ./server | ||
dockerfile: Dockerfile | ||
ports: | ||
- "65520:65520" | ||
networks: | ||
- ink-network | ||
volumes: | ||
- ./storage:/usr/src/app/storage | ||
networks: | ||
ink-remix-dev: | ||
ink-network: |
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,83 @@ | ||
## Flow of the process | ||
|
||
### Prerequisites | ||
|
||
* Minikube or your GKE/AKS/EKS cluster | ||
* Helm (https://helm.sh/docs/intro/install/) | ||
* Tiller | ||
|
||
### Configure default values | ||
|
||
Update values in values.yaml file to your requirements (can be used as is) | ||
|
||
#### Running in minikube | ||
|
||
Start minikube with default values. | ||
|
||
```bash | ||
minkube start | ||
``` | ||
|
||
Once it's finished you can proceed to next step. | ||
|
||
### Running in any kubernetes provider | ||
|
||
#### Run helm and install the chart | ||
|
||
```bash | ||
helm install --namespace ink --name ink . | ||
``` | ||
|
||
Once it finishes you can open dashboard on your cloud provider or with minikube use: | ||
|
||
```bash | ||
minikube dashboard & | ||
``` | ||
|
||
#### Upgrade | ||
|
||
```bash | ||
helm upgrade ink . | ||
``` | ||
|
||
#### Delete | ||
|
||
If you want to delete just run | ||
|
||
```bash | ||
helm del --purge ink | ||
``` | ||
|
||
#### Troubleshooting | ||
|
||
If you are missing Tiller just run: | ||
|
||
```bash | ||
helm init | ||
``` | ||
|
||
Hacky solution for tiller problems: | ||
|
||
```bash | ||
kubectl --namespace kube-system create serviceaccount tiller | ||
|
||
kubectl create clusterrolebinding tiller-cluster-rule \ | ||
--clusterrole=cluster-admin --serviceaccount=kube-system:tiller | ||
|
||
kubectl --namespace kube-system patch deploy tiller-deploy \ | ||
-p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}' | ||
``` | ||
|
||
https://github.com/helm/helm/issues/3130 | ||
|
||
### Installing Ingress | ||
|
||
```bash | ||
helm install stable/nginx-ingress --namespace ink --name ink-ingress --set controller.replicaCount=2 --set rbac.create=true | ||
``` | ||
|
||
#### Apply the rules | ||
|
||
```bash | ||
kubectl apply -f ingress-rules.yaml | ||
``` |
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,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*~ | ||
generated_config/ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
Oops, something went wrong.