Skip to content

Commit

Permalink
Merge pull request #116 from Patrik-Stas/daemon/sovstaging-genesis-up…
Browse files Browse the repository at this point in the history
…date

Daemon/sovstaging genesis update
  • Loading branch information
Patrik-Stas authored Aug 22, 2021
2 parents 6660a98 + d31612c commit fbc959d
Show file tree
Hide file tree
Showing 22 changed files with 618 additions and 26 deletions.
147 changes: 131 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,17 @@ jobs:
HASH_INDYSCAN_STORAGE=${{ hashFiles('indyscan-storage') }}
HASH_INDYSCAN_TXTYPE=${{ hashFiles('indyscan-txtype') }}
REBUILD_SEED_API=1
REBUILD_SEED_WEBAPP=1
REBUILD_SEED_DAEMON=1
REBUILD_SEED_DAEMON_UI=2
echo "::set-output name=CACHE_KEY_LIBINDY::${HASH_DOCKERFILE_LIBINDY:0:11}"
echo "::set-output name=CACHE_KEY_API::${HASH_INDYSCAN_API:0:12}-${HASH_INDYSCAN_STORAGE:0:12}-${HASH_INDYSCAN_TXTYPE:0:12}"
echo "::set-output name=CACHE_KEY_WEBAPP::${HASH_INDYSCAN_WEBAPP:0:12}-${HASH_INDYSCAN_API_CLIENT:0:12}-${HASH_INDYSCAN_TXTYPE:0:12}"
echo "::set-output name=CACHE_KEY_DAEMON::${HASH_INDYSCAN_DAEMON:0:12}-${HASH_INDYSCAN_STORAGE:0:12}-${HASH_INDYSCAN_TXTYPE:0:12}"
echo "::set-output name=CACHE_KEY_DAEMON_UI::${HASH_INDYSCAN_DAEMON_UI:0:12}-${HASH_INDYSCAN_DAEMON_API_CLIENT:0:12}"
echo "::set-output name=CACHE_KEY_API::$REBUILD_SEED_API-${HASH_INDYSCAN_API:0:12}-${HASH_INDYSCAN_STORAGE:0:12}-${HASH_INDYSCAN_TXTYPE:0:12}"
echo "::set-output name=CACHE_KEY_WEBAPP::$REBUILD_SEED_WEBAPP-${HASH_INDYSCAN_WEBAPP:0:12}-${HASH_INDYSCAN_API_CLIENT:0:12}-${HASH_INDYSCAN_TXTYPE:0:12}"
echo "::set-output name=CACHE_KEY_DAEMON::$REBUILD_SEED_DAEMON-${HASH_INDYSCAN_DAEMON:0:12}-${HASH_INDYSCAN_STORAGE:0:12}-${HASH_INDYSCAN_TXTYPE:0:12}"
echo "::set-output name=CACHE_KEY_DAEMON_UI::$REBUILD_SEED_DAEMON_UI-${HASH_INDYSCAN_DAEMON_UI:0:12}-${HASH_INDYSCAN_DAEMON_API_CLIENT:0:12}"
echo "::set-output name=DOCKER_IMG_NAME_LIBINDY::indyscan-indysdk"
echo "::set-output name=DOCKER_IMG_NAME_API::indyscan-api"
Expand Down Expand Up @@ -254,11 +259,11 @@ jobs:
-t "$DOCKER_IMG_NAME_API" \
.
mkdir -p /tmp/docker
docker save "$DOCKER_IMG_NAME_API" > /tmp/docker/img.rar
docker save "$DOCKER_IMG_NAME_API" > "/tmp/docker/$DOCKER_IMG_NAME_API.rar"
- name: Load image from cache
run: |
docker load < /tmp/docker/img.rar
docker load < "/tmp/docker/$DOCKER_IMG_NAME_API.rar"
- name: Verify image was loaded
run: |
docker image ls --format "{{.Repository}}:{{.Tag}}" | grep "$DOCKER_IMG_NAME_API" || { echo "Image $DOCKER_IMG_NAME_API was not found!" ; exit 1; }
Expand Down Expand Up @@ -288,11 +293,11 @@ jobs:
-t "$DOCKER_IMG_NAME_WEBAPP" \
.
mkdir -p /tmp/docker
docker save "$DOCKER_IMG_NAME_WEBAPP" > /tmp/docker/img.rar
docker save "$DOCKER_IMG_NAME_WEBAPP" > "/tmp/docker/$DOCKER_IMG_NAME_WEBAPP.rar"
- name: Load image from cache
run: |
docker load < /tmp/docker/img.rar
docker load < "/tmp/docker/$DOCKER_IMG_NAME_WEBAPP.rar"
- name: Verify image was loaded
run: |
docker image ls --format "{{.Repository}}:{{.Tag}}" | grep "$DOCKER_IMG_NAME_WEBAPP" || { echo "Image $DOCKER_IMG_NAME_WEBAPP was not found!" ; exit 1; }
Expand Down Expand Up @@ -371,11 +376,11 @@ jobs:
-t "$DOCKER_IMG_NAME_DAEMON" \
.
mkdir -p /tmp/docker
docker save "$DOCKER_IMG_NAME_DAEMON" > /tmp/docker/img.rar
docker save "$DOCKER_IMG_NAME_DAEMON" > "/tmp/docker/$DOCKER_IMG_NAME_DAEMON.rar"
- name: Load image from cache
run: |
docker load < /tmp/docker/img.rar
docker load < "/tmp/docker/$DOCKER_IMG_NAME_DAEMON.rar"
- name: Verify image was loaded
run: |
docker image ls --format "{{.Repository}}:{{.Tag}}" | grep "$DOCKER_IMG_NAME_DAEMON" || { echo "Image $DOCKER_IMG_NAME_DAEMON was not found!" ; exit 1; }
Expand Down Expand Up @@ -405,14 +410,124 @@ jobs:
-t "$DOCKER_IMG_NAME_DAEMON_UI" \
.
mkdir -p /tmp/docker
docker save "$DOCKER_IMG_NAME_DAEMON_UI" > /tmp/docker/img.rar
docker save "$DOCKER_IMG_NAME_DAEMON_UI" > "/tmp/docker/$DOCKER_IMG_NAME_DAEMON_UI.rar"
- name: Load image from cache
run: |
docker load < "/tmp/docker/$DOCKER_IMG_NAME_DAEMON_UI.rar"
- name: Verify image was loaded
run: |
docker image ls --format "{{.Repository}}:{{.Tag}}" | grep "$DOCKER_IMG_NAME_DAEMON_UI" || { echo "Image $DOCKER_IMG_NAME_DAEMON_UI was not found!" ; exit 1; }
test-e2e-sovrin:
needs:
- workflow-setup
- build-docker-api
- build-docker-webapp
- build-docker-daemon
- build-docker-daemon-ui
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
CACHE_KEY_API: ${{ needs.workflow-setup.outputs.CACHE_KEY_API }}
DOCKER_IMG_NAME_API: ${{ needs.workflow-setup.outputs.DOCKER_IMG_NAME_API }}

CACHE_KEY_WEBAPP: ${{ needs.workflow-setup.outputs.CACHE_KEY_WEBAPP }}
DOCKER_IMG_NAME_WEBAPP: ${{ needs.workflow-setup.outputs.DOCKER_IMG_NAME_WEBAPP }}

CACHE_KEY_DAEMON: ${{ needs.workflow-setup.outputs.CACHE_KEY_DAEMON }}
DOCKER_IMG_NAME_DAEMON: ${{ needs.workflow-setup.outputs.DOCKER_IMG_NAME_DAEMON }}

CACHE_KEY_DAEMON_UI: ${{ needs.workflow-setup.outputs.CACHE_KEY_DAEMON_UI }}
DOCKER_IMG_NAME_DAEMON_UI: ${{ needs.workflow-setup.outputs.DOCKER_IMG_NAME_DAEMON_UI }}
steps:
- name: Git checkout
uses: actions/checkout@v2

- name: Try load from cache.
id: load-image-api
uses: actions/cache@v2
with:
path: /tmp/docker
key: ${{ env.CACHE_KEY_API }}
- name: If NOT found in cache, build and cache image.
if: steps.load-image-api.outputs.cache-hit != 'true'
run: |
echo "Image not found"
- name: Load image from cache
run: |
docker load < /tmp/docker/$DOCKER_IMG_NAME_API.rar
- name: Verify image was loaded
run: |
docker image ls --format "{{.Repository}}:{{.Tag}}" | grep "$DOCKER_IMG_NAME_API" || { echo "Image $DOCKER_IMG_NAME_API was not found!" ; exit 1; }
- name: Try load from cache.
id: load-image-webapp
uses: actions/cache@v2
with:
path: /tmp/docker
key: ${{ env.CACHE_KEY_WEBAPP }}
- name: If NOT found in cache, build and cache image.
if: steps.load-image-webapp.outputs.cache-hit != 'true'
run: |
echo "Image not found"
- name: Load image from cache
run: |
docker load < /tmp/docker/img.rar
docker load < /tmp/docker/$DOCKER_IMG_NAME_WEBAPP.rar
- name: Verify image was loaded
run: |
docker image ls --format "{{.Repository}}:{{.Tag}}" | grep "$DOCKER_IMG_NAME_WEBAPP" || { echo "Image $DOCKER_IMG_NAME_WEBAPP was not found!" ; exit 1; }
- name: Try load from cache.
id: load-image-daemon
uses: actions/cache@v2
with:
path: /tmp/docker
key: ${{ env.CACHE_KEY_DAEMON }}
- name: If NOT found in cache, build and cache image.
if: steps.load-image-daemon.outputs.cache-hit != 'true'
run: |
echo "Image not found"
- name: Load image from cache
run: |
docker load < /tmp/docker/$DOCKER_IMG_NAME_DAEMON.rar
- name: Verify image was loaded
run: |
docker image ls --format "{{.Repository}}:{{.Tag}}" | grep "$DOCKER_IMG_NAME_DAEMON" || { echo "Image $DOCKER_IMG_NAME_DAEMON was not found!" ; exit 1; }
- name: Try load from cache.
id: load-image-daemon-ui
uses: actions/cache@v2
with:
path: /tmp/docker
key: ${{ env.CACHE_KEY_DAEMON_UI }}
- name: If NOT found in cache, build and cache image.
if: steps.load-image-daemon-ui.outputs.cache-hit != 'true'
run: |
echo "Image not found"
- name: Load image from cache
run: |
docker load < /tmp/docker/$DOCKER_IMG_NAME_DAEMON_UI.rar
- name: Verify image was loaded
run: |
docker image ls --format "{{.Repository}}:{{.Tag}}" | grep "$DOCKER_IMG_NAME_DAEMON_UI" || { echo "Image $DOCKER_IMG_NAME_DAEMON_UI was not found!" ; exit 1; }
- name: Run indyscan
run: |
cd ci/integration-sovrin && make new && sleep 30
- name: Query indyscan-api
run: |
curl -vv -H "Content-Type: application/json" http://localhost:3708/api/networks/SOVRIN_STAGINGNET/ledgers/domain/txs/5
exit_status=$?
if [ $exit_status -eq 1 ]; then
exit -1
fi
- name: Query indyscan-webapp
run: |
curl -vv -H "Content-Type: application/json" http://localhost:3707/home/SOVRIN_STAGINGNET
exit_status=$?
if [ $exit_status -eq 1 ]; then
exit -1
fi
publish-docker-api:
runs-on: ubuntu-16.04
Expand All @@ -434,7 +549,7 @@ jobs:
if: steps.load-cached-image.outputs.cache-hit != 'true'
run: echo "ERROR == Expected to find image from cache $CACHE_KEY_API"; exit -1
- name: Load image from cache
run: docker load < /tmp/docker/img.rar
run: docker load < /tmp/docker/$DOCKER_IMG_NAME_API.rar
- name: Verify libvcx image were loaded
run: |
docker image ls --format "{{.Repository}}:{{.Tag}}" | grep "$DOCKER_IMG_NAME_API" || { echo "Image $DOCKER_IMG_NAME_API was not found!" ; exit 1; }
Expand Down Expand Up @@ -479,7 +594,7 @@ jobs:
if: steps.load-cached-image.outputs.cache-hit != 'true'
run: echo "ERROR == Expected to find image from cache $CACHE_KEY_WEBAPP"; exit -1
- name: Load image from cache
run: docker load < /tmp/docker/img.rar
run: docker load < /tmp/docker/$DOCKER_IMG_NAME_WEBAPP.rar
- name: Verify libvcx image were loaded
run: |
docker image ls --format "{{.Repository}}:{{.Tag}}" | grep "$DOCKER_IMG_NAME_WEBAPP" || { echo "Image $DOCKER_IMG_NAME_WEBAPP was not found!" ; exit 1; }
Expand Down Expand Up @@ -524,7 +639,7 @@ jobs:
if: steps.load-cached-image.outputs.cache-hit != 'true'
run: echo "ERROR == Expected to find image from cache $CACHE_KEY_DAEMON"; exit -1
- name: Load image from cache
run: docker load < /tmp/docker/img.rar
run: docker load < /tmp/docker/$DOCKER_IMG_NAME_DAEMON.rar
- name: Verify libvcx image were loaded
run: |
docker image ls --format "{{.Repository}}:{{.Tag}}" | grep "$DOCKER_IMG_NAME_DAEMON" || { echo "Image $DOCKER_IMG_NAME_DAEMON was not found!" ; exit 1; }
Expand Down Expand Up @@ -569,7 +684,7 @@ jobs:
if: steps.load-cached-image.outputs.cache-hit != 'true'
run: echo "ERROR == Expected to find image from cache $CACHE_KEY_DAEMON_UI"; exit -1
- name: Load image from cache
run: docker load < /tmp/docker/img.rar
run: docker load < /tmp/docker/$DOCKER_IMG_NAME_DAEMON_UI.rar
- name: Verify libvcx image were loaded
run: |
docker image ls --format "{{.Repository}}:{{.Tag}}" | grep "$DOCKER_IMG_NAME_DAEMON_UI" || { echo "Image $DOCKER_IMG_NAME_DAEMON_UI was not found!" ; exit 1; }
Expand Down
2 changes: 2 additions & 0 deletions ci/integration-sovrin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/tmp-*
.env
20 changes: 20 additions & 0 deletions ci/integration-sovrin/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## Full Indyscan + ES
logs:
docker-compose -f docker-compose.yml -f docker-compose.es.yml logs -f

pull:
docker-compose -f docker-compose.yml -f docker-compose.es.yml pull

up:
docker-compose -f docker-compose.yml -f docker-compose.es.yml up && \
make logs

down:
docker-compose -f docker-compose.yml -f docker-compose.es.yml down --remove-orphans

destroy:
docker-compose -f docker-compose.yml -f docker-compose.es.yml down --remove-orphans --volumes

new:
make destroy && \
docker-compose -f docker-compose.yml -f docker-compose.es.yml up -d
36 changes: 36 additions & 0 deletions ci/integration-sovrin/app-config-api/sovrin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[
{
"id": "SOVRIN_MAINNET",
"aliases": [
"SOVRIN_MAINNET"
],
"ui": {
"priority": 3,
"display": "MainNet",
"display-long": "Sovrin MainNet",
"description": "Sovrin network for production use cases.",
"logo-address": "/static/sovrin.png"
},
"es" : {
"index": "txs-sovmain"
}
},
{
"id": "SOVRIN_STAGINGNET",
"ui": {
"priority": 2,
"display": "StagingNet",
"display-long": "Sovrin StagingNet",
"description": "Network for to try out proof of concepts, demos, and other non-production but stable use cases.",
"tutorial": "Get your DID and start writing on the network",
"tutorial-link": "https://selfserve.sovrin.org/",
"logo-address": "/static/sovrin.png"
},
"aliases": [
"SOVRIN_TESTNET"
],
"es" : {
"index": "txs-sovstaging"
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{"reqSignature":{},"txn":{"data":{"data":{"alias":"ev1","client_ip":"54.207.36.81","client_port":"9702","node_ip":"18.231.96.215","node_port":"9701","services":["VALIDATOR"]},"dest":"GWgp6huggos5HrzHVDy5xeBkYHxPvrRZzjPNAyJAqpjA"},"metadata":{"from":"J4N1K1SEB8uY2muwmecY5q"},"type":"0"},"txnMetadata":{"seqNo":1,"txnId":"b0c82a3ade3497964cb8034be915da179459287823d92b5717e6d642784c50e6"},"ver":"1"}
{"reqSignature":{},"txn":{"data":{"data":{"alias":"zaValidator","client_ip":"154.0.164.39","client_port":"9702","node_ip":"154.0.164.39","node_port":"9701","services":["VALIDATOR"]},"dest":"BnubzSjE3dDVakR77yuJAuDdNajBdsh71ZtWePKhZTWe"},"metadata":{"from":"UoFyxT8BAqotbkhiehxHCn"},"type":"0"},"txnMetadata":{"seqNo":2,"txnId":"d5f775f65e44af60ff69cfbcf4f081cd31a218bf16a941d949339dadd55024d0"},"ver":"1"}
{"reqSignature":{},"txn":{"data":{"data":{"alias":"danube","client_ip":"128.130.204.35","client_port":"9722","node_ip":"128.130.204.35","node_port":"9721","services":["VALIDATOR"]},"dest":"476kwEjDj5rxH5ZcmTtgnWqDbAnYJAGGMgX7Sq183VED"},"metadata":{"from":"BrYDA5NubejDVHkCYBbpY5"},"type":"0"},"txnMetadata":{"seqNo":3,"txnId":"ebf340b317c044d970fcd0ca018d8903726fa70c8d8854752cd65e29d443686c"},"ver":"1"}
{"reqSignature":{},"txn":{"data":{"data":{"alias":"royal_sovrin","client_ip":"35.167.133.255","client_port":"9702","node_ip":"35.167.133.255","node_port":"9701","services":["VALIDATOR"]},"dest":"Et6M1U7zXQksf7QM6Y61TtmXF1JU23nsHCwcp1M9S8Ly"},"metadata":{"from":"4ohadAwtb2kfqvXynfmfbq"},"type":"0"},"txnMetadata":{"seqNo":4,"txnId":"24d391604c62e0e142ea51c6527481ae114722102e27f7878144d405d40df88d"},"ver":"1"}
{"reqSignature":{},"txn":{"data":{"data":{"alias":"digitalbazaar","client_ip":"34.226.105.29","client_port":"9701","node_ip":"34.226.105.29","node_port":"9700","services":["VALIDATOR"]},"dest":"D9oXgXC3b6ms3bXxrUu6KqR65TGhmC1eu7SUUanPoF71"},"metadata":{"from":"rckdVhnC5R5WvdtC83NQp"},"type":"0"},"txnMetadata":{"seqNo":5,"txnId":"56e1af48ef806615659304b1e5cf3ebf87050ad48e6310c5e8a8d9332ac5c0d8"},"ver":"1"}
{"reqSignature":{},"txn":{"data":{"data":{"alias":"OASFCU","client_ip":"38.70.17.248","client_port":"9702","node_ip":"38.70.17.248","node_port":"9701","services":["VALIDATOR"]},"dest":"8gM8NHpq2cE13rJYF33iDroEGiyU6wWLiU1jd2J4jSBz"},"metadata":{"from":"BFAeui85mkcuNeQQhZfqQY"},"type":"0"},"txnMetadata":{"seqNo":6,"txnId":"825aeaa33bc238449ec9bd58374b2b747a0b4859c5418da0ad201e928c3049ad"},"ver":"1"}
{"reqSignature":{},"txn":{"data":{"data":{"alias":"BIGAWSUSEAST1-001","client_ip":"34.224.255.108","client_port":"9796","node_ip":"34.224.255.108","node_port":"9769","services":["VALIDATOR"]},"dest":"HMJedzRbFkkuijvijASW2HZvQ93ooEVprxvNhqhCJUti"},"metadata":{"from":"L851TgZcjr6xqh4w6vYa34"},"type":"0"},"txnMetadata":{"seqNo":7,"txnId":"40fceb5fea4dbcadbd270be6d5752980e89692151baf77a6bb64c8ade42ac148"},"ver":"1"}
{"reqSignature":{},"txn":{"data":{"data":{"alias":"DustStorm","client_ip":"207.224.246.57","client_port":"9712","node_ip":"207.224.246.57","node_port":"9711","services":["VALIDATOR"]},"dest":"8gGDjbrn6wdq6CEjwoVStjQCEj3r7FCxKrA5d3qqXxjm"},"metadata":{"from":"FjuHvTjq76Pr9kdZiDadqq"},"type":"0"},"txnMetadata":{"seqNo":8,"txnId":"6d1ee3eb2057b8435333b23f271ab5c255a598193090452e9767f1edf1b4c72b"},"ver":"1"}
{"reqSignature":{},"txn":{"data":{"data":{"alias":"prosovitor","client_ip":"138.68.240.143","client_port":"9711","node_ip":"138.68.240.143","node_port":"9710","services":["VALIDATOR"]},"dest":"C8W35r9D2eubcrnAjyb4F3PC3vWQS1BHDg7UvDkvdV6Q"},"metadata":{"from":"Y1ENo59jsXYvTeP378hKWG"},"type":"0"},"txnMetadata":{"seqNo":9,"txnId":"15f22de8c95ef194f6448cfc03e93aeef199b9b1b7075c5ea13cfef71985bd83"},"ver":"1"}
{"reqSignature":{},"txn":{"data":{"data":{"alias":"iRespond","client_ip":"52.187.10.28","client_port":"9702","node_ip":"52.187.10.28","node_port":"9701","services":["VALIDATOR"]},"dest":"3SD8yyJsK7iKYdesQjwuYbBGCPSs1Y9kYJizdwp2Q1zp"},"metadata":{"from":"JdJi97RRDH7Bx7khr1znAq"},"type":"0"},"txnMetadata":{"seqNo":10,"txnId":"b65ce086b631ed75722a4e1f28fc9cf6119b8bc695bbb77b7bdff53cfe0fc2e2"},"ver":"1"}
Loading

0 comments on commit fbc959d

Please sign in to comment.