forked from akash-network/console-old
-
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.
Import console for open-source release
- Loading branch information
0 parents
commit a909462
Showing
292 changed files
with
33,168 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,9 @@ | ||
Dockerfile | ||
.dockerignore | ||
.gitignore | ||
README.md | ||
|
||
# Artifacts that will be built during image creation. | ||
# This should contain all files created during `npm run build`. | ||
build | ||
node_modules |
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,17 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = false | ||
insert_final_newline = false | ||
|
||
[*.{js,ts,jsx,tsx,yml}] | ||
indent_size = 2 | ||
quote_type = single | ||
max_line_length = 100 |
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,32 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: "[OC MVP]" | ||
labels: Needs Triage | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
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,20 @@ | ||
--- | ||
name: Enhancement request | ||
about: Suggest an idea for this project | ||
title: "[OC MVP+]" | ||
labels: kind/enhancement | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
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,15 @@ | ||
--- | ||
title: Deployment Approval Required for {{ env.ENVIRONMENT }} | ||
labels: deployment-requested | ||
--- | ||
|
||
Deployment Approval requested from {{ payload.sender.login }}. | ||
|
||
Comment "Approved" to kick the deployment off. | ||
|
||
```json target_payload | ||
{ | ||
"runNumber": {{ env.RUNNUMBER }}, | ||
"environment": "{{ env.ENVIRONMENT }}" | ||
} | ||
``` |
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,56 @@ | ||
name: Build Image | ||
|
||
on: | ||
workflow_run: | ||
workflows: [ 'Create Image Tag' ] | ||
types: | ||
- completed | ||
workflow_dispatch: | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: get latest tag | ||
run: |- | ||
git fetch --prune --unshallow | ||
git remote update | ||
echo "LATEST_TAG=$(git describe --abbrev=0 --tags)" >> $GITHUB_ENV | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: web | ||
file: web/Dockerfile.staging | ||
push: true | ||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.LATEST_TAG }} | ||
labels: web | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: proxy | ||
file: proxy/Dockerfile.staging | ||
push: true | ||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-proxy:${{ env.LATEST_TAG }} | ||
labels: proxy |
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: Create Image Tag | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
tag: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: tool3/bump@master | ||
with: | ||
branch: main | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
unrelated: true |
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: "Issue Labeler" | ||
on: | ||
issues: | ||
types: [opened] | ||
|
||
jobs: | ||
triage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: github/[email protected] | ||
with: | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
configuration-path: .github/labeler.yml | ||
enable-versioned-regex: 1 | ||
versioned-regex: 'issue_labeler_regex_version=(\d+)' | ||
body-missing-regex-label: 'product/console' |
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,111 @@ | ||
name: Production | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
env: | ||
AKASH_HOME: /home/runner/.akash | ||
AKASH_NODE: https://rpc.akash.forbole.com:443 | ||
AKASH_GAS: auto | ||
AKASH_GAS_ADJUSTMENT: 1.15 | ||
AKASH_GAS_PRICES: 0.025uakt | ||
AKASH_SIGN_MODE: amino-json | ||
AKASH_CHAIN_ID: akashnet-2 | ||
AKASH_FROM: AKASH_GITHUB_RUNNER | ||
AKASH_KEYRING_BACKEND: test | ||
AKASH_PROVIDER: akash1q7spv2cw06yszgfp4f9ed59lkka6ytn8g4tkjf | ||
AKASH_DSEQ: 8490137 | ||
AKASH_PROXY_DSEQ: 8490141 | ||
|
||
jobs: | ||
publish-on-akash: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: installing toolset | ||
run: sudo apt install wget curl jq | ||
|
||
- name: Install Akash CLI | ||
shell: bash | ||
run: |- | ||
wget https://github.com/ovrclk/provider-services/releases/download/v0.1.0/provider-services_linux_amd64.deb -O akash.deb | ||
sudo dpkg -i akash.deb | ||
sudo ln -s "$(which provider-services)" "$(dirname $(which provider-services))"/akash | ||
- name: import key | ||
shell: bash | ||
run: |- | ||
echo "${{ secrets.AKASH_WALLET_KEY }}" > key.key | ||
echo "${{ secrets.AKASH_WALLET_KEY_PASSWORD }}" | akash keys import AKASH_GITHUB_RUNNER key.key | ||
- name: import certificate | ||
shell: bash | ||
run: echo "${{ secrets.AKASH_DEPLOY_CERTIFICATE }}" > ${{env.AKASH_HOME}}/$(akash keys show AKASH_GITHUB_RUNNER --output=json | jq -r ".address").pem | ||
|
||
- name: get latest tag | ||
run: |- | ||
git fetch --prune --unshallow | ||
git remote update | ||
echo "LATEST_TAG=$(git describe --abbrev=0 --tags)" >> $GITHUB_ENV | ||
#### | ||
## Deploy the web front end | ||
#### | ||
- name: Akash Update SDL - web | ||
uses: ovrclk/akash-ghaction-templated-sdl@v1 | ||
with: | ||
TEMPLATE_PATH: "deploy-web.tmpl" | ||
OUT_PATH: "deploy.yaml" | ||
env: | ||
TAG: ${{env.LATEST_TAG}} | ||
DEPLOY_PROFILE: web | ||
PORT: 3000 | ||
IMAGE: console | ||
MEMORY: 8Gi | ||
URI1: staging-console.akash.network | ||
URI2: console-demo.akash.network | ||
|
||
- name: Print web front end SDL | ||
run: cat deploy.yaml | ||
|
||
- name: Akash on Github Actions Update Deploy - web | ||
uses: ovrclk/akash-ghaction-updatedeploy@main | ||
with: | ||
AKASH_DSEQ: ${{env.AKASH_DSEQ}} | ||
AKASH_PROVIDER: ${{env.AKASH_PROVIDER}} | ||
AKASH_NODE: ${{env.AKASH_NODE}} | ||
|
||
- name: query deployment - web | ||
run: |- | ||
akash lease-status --node ${{env.AKASH_NODE}} --dseq ${{env.AKASH_DSEQ}} --from ${{env.AKASH_FROM}} --provider ${{env.AKASH_PROVIDER}} --keyring-backend test | ||
#### | ||
## Deploy the proxy | ||
#### | ||
- name: Akash Update SDL - proxy | ||
uses: ovrclk/akash-ghaction-templated-sdl@v1 | ||
with: | ||
TEMPLATE_PATH: "deploy-proxy.tmpl" | ||
OUT_PATH: "deploy.yaml" | ||
env: | ||
DEPLOY_PROFILE: proxy | ||
TAG: ${{env.LATEST_TAG}} | ||
PORT: 3005 | ||
IMAGE: console-proxy | ||
MEMORY: 2Gi | ||
URI: staging-console-proxy.akash.network | ||
|
||
- name: Print proxy SDL | ||
run: cat deploy.yaml | ||
|
||
- name: Akash on Github Actions Update Deploy - proxy | ||
uses: ovrclk/akash-ghaction-updatedeploy@main | ||
with: | ||
AKASH_DSEQ: ${{env.AKASH_PROXY_DSEQ}} | ||
AKASH_PROVIDER: ${{env.AKASH_PROVIDER}} | ||
AKASH_NODE: ${{env.AKASH_NODE}} | ||
|
||
- name: query deployment - proxy | ||
run: |- | ||
akash lease-status --node ${{env.AKASH_NODE}} --dseq ${{env.AKASH_PROXY_DSEQ}} --from ${{env.AKASH_FROM}} --provider ${{env.AKASH_PROVIDER}} --keyring-backend test |
Oops, something went wrong.