Skip to content

Commit

Permalink
Using Will's algod docker image (#568)
Browse files Browse the repository at this point in the history
* works on local end

* use /bin/bash?

* update waiting message better

* use docker compose wait, with healthcheck, thanks Ben!

* minor, fix local act vers, though EOF error bug me again

* remove check line in workflow

* Simplify build by switching from docker-compose to docker compose (#571)

* Rename make commands to reflect move from sandbox to wwinder/algod (#572)

Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com>
  • Loading branch information
ahangsu and michaeldiamant committed Oct 19, 2022
1 parent 5d5f4d4 commit 06bbd6d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 27 deletions.
23 changes: 4 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,29 +44,14 @@ jobs:
expected="${{ matrix.python }}"
echo $installed
[[ $installed =~ "Python ${expected}" ]] && echo "Configured Python" || (echo "Failed to configure Python" && exit 1)
- name: Local ACT Only - Install required os level applications
if: ${{ env.ACT }}
run: |
sudo apt update -y
sudo apt install -y curl
sudo apt -y install ca-certificates curl gnupg lsb-release
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
sudo echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt -y install docker-ce docker-ce-cli containerd.io
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
docker-compose --version
- name: Create sandbox
run: make sandbox-dev-up
- name: Start algod
run: make algod-start
- name: Install python dependencies
run: make setup-development
- name: Integration Tests Only
run: make test-integration
- name: Stop running images
run: make sandbox-dev-stop
- name: Stop algod
run: make algod-stop

build-docset:
runs-on: ubuntu-20.04
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ lint-and-test: check-generate-init lint test-unit

# ---- Integration Tests (algod required) ---- #

sandbox-dev-up:
docker-compose up -d algod
algod-start:
docker compose up -d algod --wait

sandbox-dev-stop:
docker-compose stop algod
algod-stop:
docker compose stop algod

integration-run:
pytest -n $(NUM_PROCS) --durations=10 -sv tests/integration
Expand Down
15 changes: 11 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@ version: '3'

services:
algod:
image: makerxau/algorand-sandbox-dev:latest
image: wwinder/algod:latest
ports:
- "4001:4001"
- "4002:4002"
- "9392:9392"
- "4001:8080" # algod
- "4160:4160" # gossip
- "9100:9100" # prometheus
environment:
- DEV_MODE
- TOKEN=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
healthcheck:
test: goal node status || exit 1
interval: 2s
retries: 10

0 comments on commit 06bbd6d

Please sign in to comment.