forked from cerc-io/stack-orchestrator
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bcf6564cec |
@@ -2,10 +2,7 @@ name: Fixturenet-Eth-Plugeth-Test
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: '*'
|
branches: 'ci-test'
|
||||||
paths:
|
|
||||||
- '!**'
|
|
||||||
- '.gitea/workflows/triggers/fixturenet-eth-plugeth-test'
|
|
||||||
|
|
||||||
# Needed until we can incorporate docker startup into the executor container
|
# Needed until we can incorporate docker startup into the executor container
|
||||||
env:
|
env:
|
||||||
@@ -19,16 +16,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: "Clone project repository"
|
- name: "Clone project repository"
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
# At present the stock setup-python action fails on Linux/aarch64
|
- name: "Install Python"
|
||||||
# Conditional steps below workaroud this by using deadsnakes for that case only
|
uses: cerc-io/setup-python@v4
|
||||||
- name: "Install Python for ARM on Linux"
|
|
||||||
if: ${{ runner.arch == 'arm64' && runner.os == 'Linux' }}
|
|
||||||
uses: deadsnakes/action@v3.0.1
|
|
||||||
with:
|
|
||||||
python-version: '3.8'
|
|
||||||
- name: "Install Python cases other than ARM on Linux"
|
|
||||||
if: ${{ ! (runner.arch == 'arm64' && runner.os == 'Linux') }}
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.8'
|
python-version: '3.8'
|
||||||
- name: "Print Python version"
|
- name: "Print Python version"
|
||||||
|
|||||||
@@ -2,10 +2,7 @@ name: Fixturenet-Eth-Test
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: '*'
|
branches: 'ci-test'
|
||||||
paths:
|
|
||||||
- '!**'
|
|
||||||
- '.gitea/workflows/triggers/fixturenet-eth-test'
|
|
||||||
|
|
||||||
# Needed until we can incorporate docker startup into the executor container
|
# Needed until we can incorporate docker startup into the executor container
|
||||||
env:
|
env:
|
||||||
@@ -19,15 +16,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: "Clone project repository"
|
- name: "Clone project repository"
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
# At present the stock setup-python action fails on Linux/aarch64
|
- name: "Install Python"
|
||||||
# Conditional steps below workaroud this by using deadsnakes for that case only
|
|
||||||
- name: "Install Python for ARM on Linux"
|
|
||||||
if: ${{ runner.arch == 'arm64' && runner.os == 'Linux' }}
|
|
||||||
uses: deadsnakes/action@v3.0.1
|
|
||||||
with:
|
|
||||||
python-version: '3.8'
|
|
||||||
- name: "Install Python cases other than ARM on Linux"
|
|
||||||
if: ${{ ! (runner.arch == 'arm64' && runner.os == 'Linux') }}
|
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.8'
|
python-version: '3.8'
|
||||||
|
|||||||
@@ -1,55 +0,0 @@
|
|||||||
name: Fixturenet-Laconicd-Test
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: '*'
|
|
||||||
paths:
|
|
||||||
- '!**'
|
|
||||||
- '.gitea/workflows/triggers/fixturenet-laconicd-test'
|
|
||||||
|
|
||||||
# Needed until we can incorporate docker startup into the executor container
|
|
||||||
env:
|
|
||||||
DOCKER_HOST: unix:///var/run/dind.sock
|
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
name: "Run an Laconicd fixturenet test"
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: 'Update'
|
|
||||||
run: apt-get update
|
|
||||||
- name: 'Setup jq'
|
|
||||||
run: apt-get install jq -y
|
|
||||||
- name: 'Check jq'
|
|
||||||
run: |
|
|
||||||
which jq
|
|
||||||
jq --version
|
|
||||||
- name: "Clone project repository"
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
# At present the stock setup-python action fails on Linux/aarch64
|
|
||||||
# Conditional steps below workaroud this by using deadsnakes for that case only
|
|
||||||
- name: "Install Python for ARM on Linux"
|
|
||||||
if: ${{ runner.arch == 'arm64' && runner.os == 'Linux' }}
|
|
||||||
uses: deadsnakes/action@v3.0.1
|
|
||||||
with:
|
|
||||||
python-version: '3.8'
|
|
||||||
- name: "Install Python cases other than ARM on Linux"
|
|
||||||
if: ${{ ! (runner.arch == 'arm64' && runner.os == 'Linux') }}
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: '3.8'
|
|
||||||
- name: "Print Python version"
|
|
||||||
run: python3 --version
|
|
||||||
- name: "Install shiv"
|
|
||||||
run: pip install shiv
|
|
||||||
- name: "Generate build version file"
|
|
||||||
run: ./scripts/create_build_tag_file.sh
|
|
||||||
- name: "Build local shiv package"
|
|
||||||
run: ./scripts/build_shiv_package.sh
|
|
||||||
- name: Start dockerd # Also needed until we can incorporate into the executor
|
|
||||||
run: |
|
|
||||||
dockerd -H $DOCKER_HOST --userland-proxy=false &
|
|
||||||
sleep 5
|
|
||||||
- name: "Run fixturenet-laconicd tests"
|
|
||||||
run: ./tests/fixturenet-laconicd/run-test.sh
|
|
||||||
@@ -5,8 +5,6 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- publish-test
|
- publish-test
|
||||||
paths-ignore:
|
|
||||||
- '.gitea/workflows/triggers/*'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
@@ -20,15 +18,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
build_tag=$(./scripts/create_build_tag_file.sh)
|
build_tag=$(./scripts/create_build_tag_file.sh)
|
||||||
echo "build-tag=v${build_tag}" >> $GITHUB_OUTPUT
|
echo "build-tag=v${build_tag}" >> $GITHUB_OUTPUT
|
||||||
# At present the stock setup-python action fails on Linux/aarch64
|
- name: "Install Python"
|
||||||
# Conditional steps below workaroud this by using deadsnakes for that case only
|
|
||||||
- name: "Install Python for ARM on Linux"
|
|
||||||
if: ${{ runner.arch == 'arm64' && runner.os == 'Linux' }}
|
|
||||||
uses: deadsnakes/action@v3.0.1
|
|
||||||
with:
|
|
||||||
python-version: '3.8'
|
|
||||||
- name: "Install Python cases other than ARM on Linux"
|
|
||||||
if: ${{ ! (runner.arch == 'arm64' && runner.os == 'Linux') }}
|
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.8'
|
python-version: '3.8'
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- ci-test
|
- ci-test
|
||||||
paths-ignore:
|
|
||||||
- '.gitea/workflows/triggers/*'
|
|
||||||
|
|
||||||
# Needed until we can incorporate docker startup into the executor container
|
# Needed until we can incorporate docker startup into the executor container
|
||||||
env:
|
env:
|
||||||
@@ -21,15 +19,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: "Clone project repository"
|
- name: "Clone project repository"
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
# At present the stock setup-python action fails on Linux/aarch64
|
- name: "Install Python"
|
||||||
# Conditional steps below workaroud this by using deadsnakes for that case only
|
|
||||||
- name: "Install Python for ARM on Linux"
|
|
||||||
if: ${{ runner.arch == 'arm64' && runner.os == 'Linux' }}
|
|
||||||
uses: deadsnakes/action@v3.0.1
|
|
||||||
with:
|
|
||||||
python-version: '3.8'
|
|
||||||
- name: "Install Python cases other than ARM on Linux"
|
|
||||||
if: ${{ ! (runner.arch == 'arm64' && runner.os == 'Linux') }}
|
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.8'
|
python-version: '3.8'
|
||||||
|
|||||||
@@ -1,55 +0,0 @@
|
|||||||
name: K8s Deploy Test
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches: '*'
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- ci-test
|
|
||||||
paths-ignore:
|
|
||||||
- '.gitea/workflows/triggers/*'
|
|
||||||
|
|
||||||
# Needed until we can incorporate docker startup into the executor container
|
|
||||||
env:
|
|
||||||
DOCKER_HOST: unix:///var/run/dind.sock
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
name: "Run deploy test suite"
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: "Clone project repository"
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
# At present the stock setup-python action fails on Linux/aarch64
|
|
||||||
# Conditional steps below workaroud this by using deadsnakes for that case only
|
|
||||||
- name: "Install Python for ARM on Linux"
|
|
||||||
if: ${{ runner.arch == 'arm64' && runner.os == 'Linux' }}
|
|
||||||
uses: deadsnakes/action@v3.0.1
|
|
||||||
with:
|
|
||||||
python-version: '3.8'
|
|
||||||
- name: "Install Python cases other than ARM on Linux"
|
|
||||||
if: ${{ ! (runner.arch == 'arm64' && runner.os == 'Linux') }}
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: '3.8'
|
|
||||||
- name: "Print Python version"
|
|
||||||
run: python3 --version
|
|
||||||
- name: "Install shiv"
|
|
||||||
run: pip install shiv
|
|
||||||
- name: "Generate build version file"
|
|
||||||
run: ./scripts/create_build_tag_file.sh
|
|
||||||
- name: "Build local shiv package"
|
|
||||||
run: ./scripts/build_shiv_package.sh
|
|
||||||
- name: Start dockerd # Also needed until we can incorporate into the executor
|
|
||||||
run: |
|
|
||||||
dockerd -H $DOCKER_HOST --userland-proxy=false &
|
|
||||||
sleep 5
|
|
||||||
- name: "Install Go"
|
|
||||||
uses: actions/setup-go@v4
|
|
||||||
with:
|
|
||||||
go-version: '1.21'
|
|
||||||
- name: "Install Kind"
|
|
||||||
run: go install sigs.k8s.io/kind@v0.20.0
|
|
||||||
- name: "Debug Kind"
|
|
||||||
run: kind create cluster --retain && docker logs kind-control-plane
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
name: Webapp Test
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches: '*'
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- ci-test
|
|
||||||
paths-ignore:
|
|
||||||
- '.gitea/workflows/triggers/*'
|
|
||||||
|
|
||||||
# Needed until we can incorporate docker startup into the executor container
|
|
||||||
env:
|
|
||||||
DOCKER_HOST: unix:///var/run/dind.sock
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
name: "Run webapp test suite"
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: "Clone project repository"
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
# At present the stock setup-python action fails on Linux/aarch64
|
|
||||||
# Conditional steps below workaroud this by using deadsnakes for that case only
|
|
||||||
- name: "Install Python for ARM on Linux"
|
|
||||||
if: ${{ runner.arch == 'arm64' && runner.os == 'Linux' }}
|
|
||||||
uses: deadsnakes/action@v3.0.1
|
|
||||||
with:
|
|
||||||
python-version: '3.8'
|
|
||||||
- name: "Install Python cases other than ARM on Linux"
|
|
||||||
if: ${{ ! (runner.arch == 'arm64' && runner.os == 'Linux') }}
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: '3.8'
|
|
||||||
- name: "Print Python version"
|
|
||||||
run: python3 --version
|
|
||||||
- name: "Install shiv"
|
|
||||||
run: pip install shiv
|
|
||||||
- name: "Generate build version file"
|
|
||||||
run: ./scripts/create_build_tag_file.sh
|
|
||||||
- name: "Build local shiv package"
|
|
||||||
run: ./scripts/build_shiv_package.sh
|
|
||||||
- name: Start dockerd # Also needed until we can incorporate into the executor
|
|
||||||
run: |
|
|
||||||
dockerd -H $DOCKER_HOST --userland-proxy=false &
|
|
||||||
sleep 5
|
|
||||||
- name: "Run webapp tests"
|
|
||||||
run: ./tests/webapp-test/run-webapp-test.sh
|
|
||||||
@@ -7,8 +7,6 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- ci-test
|
- ci-test
|
||||||
paths-ignore:
|
|
||||||
- '.gitea/workflows/triggers/*'
|
|
||||||
|
|
||||||
# Needed until we can incorporate docker startup into the executor container
|
# Needed until we can incorporate docker startup into the executor container
|
||||||
env:
|
env:
|
||||||
@@ -21,15 +19,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: "Clone project repository"
|
- name: "Clone project repository"
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
# At present the stock setup-python action fails on Linux/aarch64
|
- name: "Install Python"
|
||||||
# Conditional steps below workaroud this by using deadsnakes for that case only
|
|
||||||
- name: "Install Python for ARM on Linux"
|
|
||||||
if: ${{ runner.arch == 'arm64' && runner.os == 'Linux' }}
|
|
||||||
uses: deadsnakes/action@v3.0.1
|
|
||||||
with:
|
|
||||||
python-version: '3.8'
|
|
||||||
- name: "Install Python cases other than ARM on Linux"
|
|
||||||
if: ${{ ! (runner.arch == 'arm64' && runner.os == 'Linux') }}
|
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.8'
|
python-version: '3.8'
|
||||||
@@ -48,4 +38,3 @@ jobs:
|
|||||||
- name: "Run smoke tests"
|
- name: "Run smoke tests"
|
||||||
run: ./tests/smoke-test/run-smoke-test.sh
|
run: ./tests/smoke-test/run-smoke-test.sh
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
Change this file to trigger running the fixturenet-eth-plugeth-test CI job
|
|
||||||
trigger
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
Change this file to trigger running the fixturenet-eth-test CI job
|
|
||||||
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
Change this file to trigger running the fixturenet-laconicd-test CI job
|
|
||||||
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
name: Fixturenet-Eth Test
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: '*'
|
|
||||||
paths:
|
|
||||||
- '!**'
|
|
||||||
- '.github/workflows/triggers/fixturenet-eth-test'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
name: "Run fixturenet-eth test suite"
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: "Clone project repository"
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: "Install Python"
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: '3.8'
|
|
||||||
- name: "Print Python version"
|
|
||||||
run: python3 --version
|
|
||||||
- name: "Install shiv"
|
|
||||||
run: pip install shiv
|
|
||||||
- name: "Generate build version file"
|
|
||||||
run: ./scripts/create_build_tag_file.sh
|
|
||||||
- name: "Build local shiv package"
|
|
||||||
run: ./scripts/build_shiv_package.sh
|
|
||||||
- name: "Run fixturenet-eth tests"
|
|
||||||
run: ./tests/fixturenet-eth/run-test.sh
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
name: Fixturenet-Laconicd Test
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: '*'
|
|
||||||
paths:
|
|
||||||
- '!**'
|
|
||||||
- '.github/workflows/triggers/fixturenet-laconicd-test'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
name: "Run fixturenet-laconicd test suite"
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: "Clone project repository"
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: "Install Python"
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: '3.8'
|
|
||||||
- name: "Print Python version"
|
|
||||||
run: python3 --version
|
|
||||||
- name: "Install shiv"
|
|
||||||
run: pip install shiv
|
|
||||||
- name: "Generate build version file"
|
|
||||||
run: ./scripts/create_build_tag_file.sh
|
|
||||||
- name: "Build local shiv package"
|
|
||||||
run: ./scripts/build_shiv_package.sh
|
|
||||||
- name: "Run fixturenet-laconicd tests"
|
|
||||||
run: ./tests/fixturenet-laconicd/run-test.sh
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
name: Webapp Test
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches: '*'
|
|
||||||
push:
|
|
||||||
branches: '*'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
name: "Run webapp test suite"
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: "Clone project repository"
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: "Install Python"
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: '3.8'
|
|
||||||
- name: "Print Python version"
|
|
||||||
run: python3 --version
|
|
||||||
- name: "Install shiv"
|
|
||||||
run: pip install shiv
|
|
||||||
- name: "Generate build version file"
|
|
||||||
run: ./scripts/create_build_tag_file.sh
|
|
||||||
- name: "Build local shiv package"
|
|
||||||
run: ./scripts/build_shiv_package.sh
|
|
||||||
- name: "Run webapp tests"
|
|
||||||
run: ./tests/webapp-test/run-webapp-test.sh
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
Change this file to trigger running the fixturenet-eth-test CI job
|
|
||||||
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
Change this file to trigger running the fixturenet-laconicd-test CI job
|
|
||||||
|
|
||||||
trigger
|
|
||||||
+2
-2
@@ -6,5 +6,5 @@ laconic_stack_orchestrator.egg-info
|
|||||||
__pycache__
|
__pycache__
|
||||||
*~
|
*~
|
||||||
package
|
package
|
||||||
stack_orchestrator/data/build_tag.txt
|
app/data/build_tag.txt
|
||||||
/build
|
build
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ Ensure that the following are already installed:
|
|||||||
- [Python3](https://wiki.python.org/moin/BeginnersGuide/Download): `python3 --version` >= `3.8.10` (the Python3 shipped in Ubuntu 20+ is good to go)
|
- [Python3](https://wiki.python.org/moin/BeginnersGuide/Download): `python3 --version` >= `3.8.10` (the Python3 shipped in Ubuntu 20+ is good to go)
|
||||||
- [Docker](https://docs.docker.com/get-docker/): `docker --version` >= `20.10.21`
|
- [Docker](https://docs.docker.com/get-docker/): `docker --version` >= `20.10.21`
|
||||||
- [jq](https://stedolan.github.io/jq/download/): `jq --version` >= `1.5`
|
- [jq](https://stedolan.github.io/jq/download/): `jq --version` >= `1.5`
|
||||||
- [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git): `git --version` >= `2.10.3`
|
|
||||||
|
|
||||||
Note: if installing docker-compose via package manager on Linux (as opposed to Docker Desktop), you must [install the plugin](https://docs.docker.com/compose/install/linux/#install-the-plugin-manually), e.g. :
|
Note: if installing docker-compose via package manager on Linux (as opposed to Docker Desktop), you must [install the plugin](https://docs.docker.com/compose/install/linux/#install-the-plugin-manually), e.g. :
|
||||||
|
|
||||||
@@ -49,27 +48,15 @@ Verify operation (your version will probably be different, just check here that
|
|||||||
laconic-so version
|
laconic-so version
|
||||||
Version: 1.1.0-7a607c2-202304260513
|
Version: 1.1.0-7a607c2-202304260513
|
||||||
```
|
```
|
||||||
Save the distribution url to `~/.laconic-so/config.yml`:
|
|
||||||
```bash
|
|
||||||
mkdir ~/.laconic-so
|
|
||||||
echo "distribution-url: https://github.com/cerc-io/stack-orchestrator/releases/latest/download/laconic-so" > ~/.laconic-so/config.yml
|
|
||||||
```
|
|
||||||
|
|
||||||
### Update
|
|
||||||
If Stack Orchestrator was installed using the process described above, it is able to subsequently self-update to the current latest version by running:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
laconic-so update
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
The various [stacks](/stack_orchestrator/data/stacks) each contain instructions for running different stacks based on your use case. For example:
|
The various [stacks](/app/data/stacks) each contain instructions for running different stacks based on your use case. For example:
|
||||||
|
|
||||||
- [self-hosted Gitea](/stack_orchestrator/data/stacks/build-support)
|
- [self-hosted Gitea](/app/data/stacks/build-support)
|
||||||
- [an Optimism Fixturenet](/stack_orchestrator/data/stacks/fixturenet-optimism)
|
- [an Optimism Fixturenet](/app/data/stacks/fixturenet-optimism)
|
||||||
- [laconicd with console and CLI](stack_orchestrator/data/stacks/fixturenet-laconic-loaded)
|
- [laconicd with console and CLI](app/data/stacks/fixturenet-laconic-loaded)
|
||||||
- [kubo (IPFS)](stack_orchestrator/data/stacks/kubo)
|
- [kubo (IPFS)](app/data/stacks/kubo)
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
from stack_orchestrator.deploy.deploy import get_stack_status
|
from app.deploy import get_stack_status
|
||||||
from decouple import config
|
from decouple import config
|
||||||
|
|
||||||
|
|
||||||
@@ -27,79 +27,12 @@ import subprocess
|
|||||||
import click
|
import click
|
||||||
import importlib.resources
|
import importlib.resources
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from stack_orchestrator.util import include_exclude_check, get_parsed_stack_config
|
from app.util import include_exclude_check, get_parsed_stack_config
|
||||||
from stack_orchestrator.base import get_npm_registry_url
|
from app.base import get_npm_registry_url
|
||||||
|
|
||||||
# TODO: find a place for this
|
# TODO: find a place for this
|
||||||
# epilog="Config provided either in .env or settings.ini or env vars: CERC_REPO_BASE_DIR (defaults to ~/cerc)"
|
# epilog="Config provided either in .env or settings.ini or env vars: CERC_REPO_BASE_DIR (defaults to ~/cerc)"
|
||||||
|
|
||||||
def make_container_build_env(dev_root_path: str,
|
|
||||||
container_build_dir: str,
|
|
||||||
debug: bool,
|
|
||||||
force_rebuild: bool,
|
|
||||||
extra_build_args: str):
|
|
||||||
container_build_env = {
|
|
||||||
"CERC_NPM_REGISTRY_URL": get_npm_registry_url(),
|
|
||||||
"CERC_GO_AUTH_TOKEN": config("CERC_GO_AUTH_TOKEN", default=""),
|
|
||||||
"CERC_NPM_AUTH_TOKEN": config("CERC_NPM_AUTH_TOKEN", default=""),
|
|
||||||
"CERC_REPO_BASE_DIR": dev_root_path,
|
|
||||||
"CERC_CONTAINER_BASE_DIR": container_build_dir,
|
|
||||||
"CERC_HOST_UID": f"{os.getuid()}",
|
|
||||||
"CERC_HOST_GID": f"{os.getgid()}",
|
|
||||||
"DOCKER_BUILDKIT": config("DOCKER_BUILDKIT", default="0")
|
|
||||||
}
|
|
||||||
container_build_env.update({"CERC_SCRIPT_DEBUG": "true"} if debug else {})
|
|
||||||
container_build_env.update({"CERC_FORCE_REBUILD": "true"} if force_rebuild else {})
|
|
||||||
container_build_env.update({"CERC_CONTAINER_EXTRA_BUILD_ARGS": extra_build_args} if extra_build_args else {})
|
|
||||||
docker_host_env = os.getenv("DOCKER_HOST")
|
|
||||||
if docker_host_env:
|
|
||||||
container_build_env.update({"DOCKER_HOST": docker_host_env})
|
|
||||||
|
|
||||||
return container_build_env
|
|
||||||
|
|
||||||
|
|
||||||
def process_container(container,
|
|
||||||
container_build_dir: str,
|
|
||||||
container_build_env: dict,
|
|
||||||
dev_root_path: str,
|
|
||||||
quiet: bool,
|
|
||||||
verbose: bool,
|
|
||||||
dry_run: bool,
|
|
||||||
continue_on_error: bool,
|
|
||||||
):
|
|
||||||
if not quiet:
|
|
||||||
print(f"Building: {container}")
|
|
||||||
build_dir = os.path.join(container_build_dir, container.replace("/", "-"))
|
|
||||||
build_script_filename = os.path.join(build_dir, "build.sh")
|
|
||||||
if verbose:
|
|
||||||
print(f"Build script filename: {build_script_filename}")
|
|
||||||
if os.path.exists(build_script_filename):
|
|
||||||
build_command = build_script_filename
|
|
||||||
else:
|
|
||||||
if verbose:
|
|
||||||
print(f"No script file found: {build_script_filename}, using default build script")
|
|
||||||
repo_dir = container.split('/')[1]
|
|
||||||
# TODO: make this less of a hack -- should be specified in some metadata somewhere
|
|
||||||
# Check if we have a repo for this container. If not, set the context dir to the container-build subdir
|
|
||||||
repo_full_path = os.path.join(dev_root_path, repo_dir)
|
|
||||||
repo_dir_or_build_dir = repo_full_path if os.path.exists(repo_full_path) else build_dir
|
|
||||||
build_command = os.path.join(container_build_dir,
|
|
||||||
"default-build.sh") + f" {container}:local {repo_dir_or_build_dir}"
|
|
||||||
if not dry_run:
|
|
||||||
if verbose:
|
|
||||||
print(f"Executing: {build_command} with environment: {container_build_env}")
|
|
||||||
build_result = subprocess.run(build_command, shell=True, env=container_build_env)
|
|
||||||
if verbose:
|
|
||||||
print(f"Return code is: {build_result.returncode}")
|
|
||||||
if build_result.returncode != 0:
|
|
||||||
print(f"Error running build for {container}")
|
|
||||||
if not continue_on_error:
|
|
||||||
print("FATAL Error: container build failed and --continue-on-error not set, exiting")
|
|
||||||
sys.exit(1)
|
|
||||||
else:
|
|
||||||
print("****** Container Build Error, continuing because --continue-on-error is set")
|
|
||||||
else:
|
|
||||||
print("Skipped")
|
|
||||||
|
|
||||||
@click.command()
|
@click.command()
|
||||||
@click.option('--include', help="only build these containers")
|
@click.option('--include', help="only build these containers")
|
||||||
@@ -119,7 +52,7 @@ def command(ctx, include, exclude, force_rebuild, extra_build_args):
|
|||||||
continue_on_error = ctx.obj.continue_on_error
|
continue_on_error = ctx.obj.continue_on_error
|
||||||
|
|
||||||
# See: https://stackoverflow.com/questions/25389095/python-get-path-of-root-project-structure
|
# See: https://stackoverflow.com/questions/25389095/python-get-path-of-root-project-structure
|
||||||
container_build_dir = Path(__file__).absolute().parent.parent.joinpath("data", "container-build")
|
container_build_dir = Path(__file__).absolute().parent.joinpath("data", "container-build")
|
||||||
|
|
||||||
if local_stack:
|
if local_stack:
|
||||||
dev_root_path = os.getcwd()[0:os.getcwd().rindex("stack-orchestrator")]
|
dev_root_path = os.getcwd()[0:os.getcwd().rindex("stack-orchestrator")]
|
||||||
@@ -134,7 +67,7 @@ def command(ctx, include, exclude, force_rebuild, extra_build_args):
|
|||||||
print('Dev root directory doesn\'t exist, creating')
|
print('Dev root directory doesn\'t exist, creating')
|
||||||
|
|
||||||
# See: https://stackoverflow.com/a/20885799/1701505
|
# See: https://stackoverflow.com/a/20885799/1701505
|
||||||
from stack_orchestrator import data
|
from app import data
|
||||||
with importlib.resources.open_text(data, "container-image-list.txt") as container_list_file:
|
with importlib.resources.open_text(data, "container-image-list.txt") as container_list_file:
|
||||||
all_containers = container_list_file.read().splitlines()
|
all_containers = container_list_file.read().splitlines()
|
||||||
|
|
||||||
@@ -150,16 +83,61 @@ def command(ctx, include, exclude, force_rebuild, extra_build_args):
|
|||||||
if stack:
|
if stack:
|
||||||
print(f"Stack: {stack}")
|
print(f"Stack: {stack}")
|
||||||
|
|
||||||
container_build_env = make_container_build_env(dev_root_path,
|
# TODO: make this configurable
|
||||||
container_build_dir,
|
container_build_env = {
|
||||||
debug,
|
"CERC_NPM_REGISTRY_URL": get_npm_registry_url(),
|
||||||
force_rebuild,
|
"CERC_GO_AUTH_TOKEN": config("CERC_GO_AUTH_TOKEN", default=""),
|
||||||
extra_build_args)
|
"CERC_NPM_AUTH_TOKEN": config("CERC_NPM_AUTH_TOKEN", default=""),
|
||||||
|
"CERC_REPO_BASE_DIR": dev_root_path,
|
||||||
|
"CERC_CONTAINER_BASE_DIR": container_build_dir,
|
||||||
|
"CERC_HOST_UID": f"{os.getuid()}",
|
||||||
|
"CERC_HOST_GID": f"{os.getgid()}",
|
||||||
|
"DOCKER_BUILDKIT": config("DOCKER_BUILDKIT", default="0")
|
||||||
|
}
|
||||||
|
container_build_env.update({"CERC_SCRIPT_DEBUG": "true"} if debug else {})
|
||||||
|
container_build_env.update({"CERC_FORCE_REBUILD": "true"} if force_rebuild else {})
|
||||||
|
container_build_env.update({"CERC_CONTAINER_EXTRA_BUILD_ARGS": extra_build_args} if extra_build_args else {})
|
||||||
|
docker_host_env = os.getenv("DOCKER_HOST")
|
||||||
|
if docker_host_env:
|
||||||
|
container_build_env.update({"DOCKER_HOST": docker_host_env})
|
||||||
|
|
||||||
|
def process_container(container):
|
||||||
|
if not quiet:
|
||||||
|
print(f"Building: {container}")
|
||||||
|
build_dir = os.path.join(container_build_dir, container.replace("/", "-"))
|
||||||
|
build_script_filename = os.path.join(build_dir, "build.sh")
|
||||||
|
if verbose:
|
||||||
|
print(f"Build script filename: {build_script_filename}")
|
||||||
|
if os.path.exists(build_script_filename):
|
||||||
|
build_command = build_script_filename
|
||||||
|
else:
|
||||||
|
if verbose:
|
||||||
|
print(f"No script file found: {build_script_filename}, using default build script")
|
||||||
|
repo_dir = container.split('/')[1]
|
||||||
|
# TODO: make this less of a hack -- should be specified in some metadata somewhere
|
||||||
|
# Check if we have a repo for this container. If not, set the context dir to the container-build subdir
|
||||||
|
repo_full_path = os.path.join(dev_root_path, repo_dir)
|
||||||
|
repo_dir_or_build_dir = repo_full_path if os.path.exists(repo_full_path) else build_dir
|
||||||
|
build_command = os.path.join(container_build_dir, "default-build.sh") + f" {container}:local {repo_dir_or_build_dir}"
|
||||||
|
if not dry_run:
|
||||||
|
if verbose:
|
||||||
|
print(f"Executing: {build_command} with environment: {container_build_env}")
|
||||||
|
build_result = subprocess.run(build_command, shell=True, env=container_build_env)
|
||||||
|
if verbose:
|
||||||
|
print(f"Return code is: {build_result.returncode}")
|
||||||
|
if build_result.returncode != 0:
|
||||||
|
print(f"Error running build for {container}")
|
||||||
|
if not continue_on_error:
|
||||||
|
print("FATAL Error: container build failed and --continue-on-error not set, exiting")
|
||||||
|
sys.exit(1)
|
||||||
|
else:
|
||||||
|
print("****** Container Build Error, continuing because --continue-on-error is set")
|
||||||
|
else:
|
||||||
|
print("Skipped")
|
||||||
|
|
||||||
for container in containers_in_scope:
|
for container in containers_in_scope:
|
||||||
if include_exclude_check(container, include, exclude):
|
if include_exclude_check(container, include, exclude):
|
||||||
process_container(container, container_build_dir, container_build_env,
|
process_container(container)
|
||||||
dev_root_path, quiet, verbose, dry_run, continue_on_error)
|
|
||||||
else:
|
else:
|
||||||
if verbose:
|
if verbose:
|
||||||
print(f"Excluding: {container}")
|
print(f"Excluding: {container}")
|
||||||
@@ -25,8 +25,8 @@ from decouple import config
|
|||||||
import click
|
import click
|
||||||
import importlib.resources
|
import importlib.resources
|
||||||
from python_on_whales import docker, DockerException
|
from python_on_whales import docker, DockerException
|
||||||
from stack_orchestrator.base import get_stack
|
from app.base import get_stack
|
||||||
from stack_orchestrator.util import include_exclude_check, get_parsed_stack_config
|
from app.util import include_exclude_check, get_parsed_stack_config
|
||||||
|
|
||||||
builder_js_image_name = "cerc/builder-js:local"
|
builder_js_image_name = "cerc/builder-js:local"
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ def command(ctx, include, exclude, force_rebuild, extra_build_args):
|
|||||||
os.makedirs(build_root_path)
|
os.makedirs(build_root_path)
|
||||||
|
|
||||||
# See: https://stackoverflow.com/a/20885799/1701505
|
# See: https://stackoverflow.com/a/20885799/1701505
|
||||||
from stack_orchestrator import data
|
from app import data
|
||||||
with importlib.resources.open_text(data, "npm-package-list.txt") as package_list_file:
|
with importlib.resources.open_text(data, "npm-package-list.txt") as package_list_file:
|
||||||
all_packages = package_list_file.read().splitlines()
|
all_packages = package_list_file.read().splitlines()
|
||||||
|
|
||||||
-4
@@ -40,7 +40,6 @@ services:
|
|||||||
- fixturenet-eth-bootnode-geth
|
- fixturenet-eth-bootnode-geth
|
||||||
ports:
|
ports:
|
||||||
- "8545"
|
- "8545"
|
||||||
- "8546"
|
|
||||||
- "40000"
|
- "40000"
|
||||||
- "6060"
|
- "6060"
|
||||||
|
|
||||||
@@ -62,9 +61,6 @@ services:
|
|||||||
- fixturenet-eth-bootnode-geth
|
- fixturenet-eth-bootnode-geth
|
||||||
volumes:
|
volumes:
|
||||||
- fixturenet_eth_geth_2_data:/root/ethdata
|
- fixturenet_eth_geth_2_data:/root/ethdata
|
||||||
ports:
|
|
||||||
- "8545"
|
|
||||||
- "8546"
|
|
||||||
|
|
||||||
fixturenet-eth-bootnode-lighthouse:
|
fixturenet-eth-bootnode-lighthouse:
|
||||||
restart: always
|
restart: always
|
||||||
-1
@@ -70,7 +70,6 @@ services:
|
|||||||
command: "/run-op-geth.sh"
|
command: "/run-op-geth.sh"
|
||||||
ports:
|
ports:
|
||||||
- "0.0.0.0:8545:8545"
|
- "0.0.0.0:8545:8545"
|
||||||
- "0.0.0.0:8546:8546"
|
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "nc", "-vz", "localhost:8545"]
|
test: ["CMD", "nc", "-vz", "localhost:8545"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
+1
-5
@@ -20,7 +20,7 @@ services:
|
|||||||
- SYS_PTRACE
|
- SYS_PTRACE
|
||||||
environment:
|
environment:
|
||||||
CERC_REMOTE_DEBUG: ${CERC_REMOTE_DEBUG:-true}
|
CERC_REMOTE_DEBUG: ${CERC_REMOTE_DEBUG:-true}
|
||||||
CERC_RUN_STATEDIFF: ${CERC_RUN_STATEDIFF:-detect}
|
CERC_RUN_STATEDIFF: "detect"
|
||||||
CERC_STATEDIFF_DB_NODE_ID: 1
|
CERC_STATEDIFF_DB_NODE_ID: 1
|
||||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||||
env_file:
|
env_file:
|
||||||
@@ -38,7 +38,6 @@ services:
|
|||||||
- fixturenet-eth-bootnode-geth
|
- fixturenet-eth-bootnode-geth
|
||||||
ports:
|
ports:
|
||||||
- "8545"
|
- "8545"
|
||||||
- "8546"
|
|
||||||
- "40000"
|
- "40000"
|
||||||
- "6060"
|
- "6060"
|
||||||
|
|
||||||
@@ -60,9 +59,6 @@ services:
|
|||||||
- fixturenet-eth-bootnode-geth
|
- fixturenet-eth-bootnode-geth
|
||||||
volumes:
|
volumes:
|
||||||
- fixturenet_plugeth_geth_2_data:/root/ethdata
|
- fixturenet_plugeth_geth_2_data:/root/ethdata
|
||||||
ports:
|
|
||||||
- "8545"
|
|
||||||
- "8546"
|
|
||||||
|
|
||||||
fixturenet-eth-bootnode-lighthouse:
|
fixturenet-eth-bootnode-lighthouse:
|
||||||
restart: always
|
restart: always
|
||||||
+4
-5
@@ -6,6 +6,9 @@ services:
|
|||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
ipfs:
|
ipfs:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
# Uncomment when running against fixturenet-lotus to wait for the Lotus node to come up
|
||||||
|
# lotus-node-1:
|
||||||
|
# condition: service_healthy
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- host.docker.internal:host-gateway
|
- host.docker.internal:host-gateway
|
||||||
environment:
|
environment:
|
||||||
@@ -15,13 +18,9 @@ services:
|
|||||||
postgres_user: graph-node
|
postgres_user: graph-node
|
||||||
postgres_pass: password
|
postgres_pass: password
|
||||||
postgres_db: graph-node
|
postgres_db: graph-node
|
||||||
ethereum: ${ETH_NETWORKS:-lotus-fixturenet:http://lotus-node-1:1234/rpc/v1}
|
ethereum: ${NETWORK:-filecoin}:${ETH_RPC_ENDPOINT:-https://archive.lotus.vdb.to/rpc/v1}
|
||||||
GRAPH_LOG: debug
|
GRAPH_LOG: debug
|
||||||
ETHEREUM_REORG_THRESHOLD: 3
|
ETHEREUM_REORG_THRESHOLD: 3
|
||||||
entrypoint: ["bash", "-c"]
|
|
||||||
# Wait for ETH RPC endpoint to be up when running with fixturenet-lotus
|
|
||||||
command: |
|
|
||||||
"wait_for ${ETH_RPC_HOST:-lotus-node-1}:${ETH_RPC_PORT:-1234} -t 1800 -- start"
|
|
||||||
ports:
|
ports:
|
||||||
- "8000"
|
- "8000"
|
||||||
- "8001"
|
- "8001"
|
||||||
+1
-1
@@ -2,7 +2,7 @@ version: "3.2"
|
|||||||
# See: https://docs.ipfs.tech/install/run-ipfs-inside-docker/#set-up
|
# See: https://docs.ipfs.tech/install/run-ipfs-inside-docker/#set-up
|
||||||
services:
|
services:
|
||||||
ipfs:
|
ipfs:
|
||||||
image: ipfs/kubo:v0.24.0
|
image: ipfs/kubo:master-2023-02-20-714a968
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- ./ipfs/import:/import
|
- ./ipfs/import:/import
|
||||||
+2
-2
@@ -6,7 +6,7 @@ services:
|
|||||||
env_file:
|
env_file:
|
||||||
- ../config/mainnet-eth-keycloak/keycloak.env
|
- ../config/mainnet-eth-keycloak/keycloak.env
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "nc", "-v", "localhost", "35432"]
|
test: ["CMD", "nc", "-v", "localhost", "5432"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 10
|
retries: 10
|
||||||
@@ -14,7 +14,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- mainnet_eth_keycloak_db:/var/lib/postgresql/data
|
- mainnet_eth_keycloak_db:/var/lib/postgresql/data
|
||||||
ports:
|
ports:
|
||||||
- 35432
|
- 5432
|
||||||
|
|
||||||
keycloak:
|
keycloak:
|
||||||
image: cerc/keycloak:local
|
image: cerc/keycloak:local
|
||||||
-1
@@ -4,7 +4,6 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||||
CERC_TEST_PARAM_1: ${CERC_TEST_PARAM_1:-FAILED}
|
|
||||||
volumes:
|
volumes:
|
||||||
- test-data:/data
|
- test-data:/data
|
||||||
ports:
|
ports:
|
||||||
+1
-1
@@ -34,7 +34,7 @@ services:
|
|||||||
- ETH_RPC_URL=http://go-ethereum:8545
|
- ETH_RPC_URL=http://go-ethereum:8545
|
||||||
command: ["sh", "-c", "yarn server"]
|
command: ["sh", "-c", "yarn server"]
|
||||||
volumes:
|
volumes:
|
||||||
- ../config/watcher-erc20/erc20-watcher.toml:/app/environments/local.toml
|
- ../config/watcher-erc20/erc20-watcher.toml:/app/packages/erc20-watcher/environments/local.toml
|
||||||
ports:
|
ports:
|
||||||
- "0.0.0.0:3002:3001"
|
- "0.0.0.0:3002:3001"
|
||||||
- "0.0.0.0:9002:9001"
|
- "0.0.0.0:9002:9001"
|
||||||
+2
-2
@@ -17,8 +17,8 @@ module.exports = {
|
|||||||
whitelistedTokenAddresses: [
|
whitelistedTokenAddresses: [
|
||||||
'NATIVE_ADDRESS',
|
'NATIVE_ADDRESS',
|
||||||
],
|
],
|
||||||
stableTokenAddresses: [],
|
stableTokenAddresses: [
|
||||||
nativePricePool: '0x0000000000000000000000000000000000000000',
|
],
|
||||||
minimumEthLocked: 1.5
|
minimumEthLocked: 1.5
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user