Compare commits

..

71 Commits

Author SHA1 Message Date
e22792dc4b Merge branch 'main' into ci-test 2024-02-17 07:30:29 -07:00
d79053b137 Merge branch 'main' into ci-test 2024-02-17 07:24:12 -07:00
85204ca29a Enable debug output on test 2024-02-15 08:41:54 -07:00
d6d016cad8 Merge branch 'main' into ci-test 2024-02-15 08:13:10 -07:00
3b553bb660 Revert to the stock runner 2024-01-30 11:13:21 -07:00
466c149f36 Switch back to alternative runner 2024-01-30 07:39:05 -07:00
3c84ebff68 Switch back to stock runner 2024-01-30 07:01:13 -07:00
d5244726aa Use new runner 2024-01-28 16:25:45 -07:00
15ae2c0cdf Merge main 2024-01-28 16:24:26 -07:00
6d5f661750 Try a longer sleep 2024-01-21 17:42:09 -07:00
bc872b09fb Add output to check cgroups version 2024-01-21 17:23:28 -07:00
a751e87dd4 Switch back to stock runner 2024-01-21 17:21:35 -07:00
5ba9a803de Trigger k8s deploy test off changes to its scripts 2024-01-21 17:19:39 -07:00
b56c84b93a Merge main 2024-01-21 17:16:09 -07:00
1520f7413d Debug CI 2023-11-08 20:02:21 -07:00
1d78430679 Merge branch 'main' into ci-test 2023-11-08 20:01:26 -07:00
46b726be9b Merge branch 'main' into ci-test 2023-10-12 15:26:38 -06:00
b3b57b6f28 Merge branch 'main' into ci-test 2023-10-03 07:25:32 -06:00
69b352dcce Make the block window wider 2023-08-17 08:31:21 -06:00
4e656df709 Extend the wait 2023-08-17 07:23:33 -06:00
7fc6375886 Revert long wait 2023-08-17 03:04:22 -06:00
ac02753ffe Build lighthouse for older CPUs 2023-08-17 02:09:29 -06:00
69d59b109b Add stack logs in case of fail 2023-08-17 00:36:36 -06:00
f62a8ff54f Try waiting even longer 2023-08-16 23:41:39 -06:00
82a839d15f Try waiting longer for a new block 2023-08-16 22:12:45 -06:00
5a31cb50c3 Add log output at end of test 2023-08-16 20:57:59 -06:00
fae2438e97 Comment out stack status step 2023-08-16 15:45:19 -06:00
952ea29ca5 Add time stamps to test script 2023-08-16 13:50:27 -06:00
fbfc162ab7 Merge branch 'main' into ci-test 2023-08-16 09:32:29 -06:00
6ff81b2049 Merge branch 'main' into ci-test 2023-08-03 14:30:10 -06:00
3b3c688ee9 Merge branch 'dboreham/update-lighthouse' into ci-test 2023-07-27 20:14:54 -06:00
16bef78312 Merge branch 'main' into ci-test 2023-07-27 20:14:45 -06:00
12e68ff1ec Use latest stable lighthouse release 2023-07-27 20:14:12 -06:00
6f3f20739d Merge branch 'main' into ci-test 2023-07-19 20:53:16 -06:00
caabaa35ff Merge branch 'main' into ci-test 2023-07-19 20:38:33 -06:00
a265794bd7
Update fixturenet-eth-test.yml
Change to trigger CI on Gitea
2023-07-18 11:43:18 -06:00
5d7e7294c9
Update fixturenet-eth-test.yml
Change to trigger CI in gitea
2023-07-18 11:33:01 -06:00
d9805666c3 Merge main 2023-06-29 15:16:38 -06:00
582b92d277 Merge main 2023-06-29 15:14:40 -06:00
David Boreham
dc19d68aa4 Merge branch 'main' into ci-test 2023-06-05 20:50:43 -06:00
David Boreham
d57e8d0efd Merge branch 'dboreham/build-local-lcli' into ci-test 2023-06-05 16:46:50 -06:00
91d3613247 Include --eth1-block-hash 2023-06-05 15:45:07 -05:00
David Boreham
76ab4a7717 Merge branch 'dboreham/build-local-lcli' into ci-test 2023-06-04 23:04:40 -06:00
David Boreham
fd40aedadd Add lcli container to fixturenet-eth stack 2023-06-04 23:03:48 -06:00
David Boreham
3748fa38b1 Update ldcli options 2023-06-04 23:01:43 -06:00
David Boreham
aa4c52c174 Fix typo 2023-06-04 16:43:38 -06:00
David Boreham
609128d004 Blind fix for lcli error 2023-06-04 16:42:44 -06:00
David Boreham
47164cb5f5 Test updated lcli command 2023-06-04 16:12:16 -06:00
David Boreham
93c47ec5cc Merge branch 'dboreham/build-local-lcli' into ci-test 2023-06-04 15:41:24 -06:00
David Boreham
700ce586a6 Merge main 2023-06-04 15:41:01 -06:00
David Boreham
223aacb16f Enable portable lcli build 2023-06-04 14:30:01 -06:00
David Boreham
c120ee2086 Pull lighthouse repo 2023-06-04 14:29:07 -06:00
David Boreham
685e11ed6f Build lcli locally 2023-06-04 14:27:07 -06:00
6cf9869a57 Merge branch 'dboreham/add-foundry-to-plugeth-stack' into ci-test 2023-05-30 23:22:03 -06:00
00d34944a2
Add foundry to fixturenet-plugeth-tx 2023-05-30 23:20:26 -06:00
40424cc3b6 Merge branch 'main' into ci-test 2023-05-30 22:33:37 -06:00
b594d15e91
Trigger CI 2023-05-30 12:23:48 -06:00
500e60c480
Trigger CI 2023-05-30 08:49:36 -06:00
8c3a8eb33d Add fixturenet-plugeth test 2023-05-25 16:56:59 -06:00
27067e061c Merge branch 'main' into ci-test 2023-05-25 16:46:36 -06:00
eab5a6ccf1
Trigger CI 2023-05-24 21:49:35 -06:00
7ed2448f03 Merge current main
Former-commit-id: d82ba6ed5035203d1ce3846744309210caadda62
2023-05-18 13:57:35 -06:00
e9e1d8bcd4 Merge branch 'main' into ci-test
Former-commit-id: 966539faa46bf33a3b6471a3289a4fb7c4685cc7
2023-05-18 13:55:29 -06:00
0563764ca4 Trigger CI
Former-commit-id: bb1d81a906000d5acf22269eaca53c6ab32c5605
2023-05-02 14:22:40 -06:00
069dd50fd3 Merge branch 'main' into ci-test
Former-commit-id: 4eb970350bbfca04ea98b21a6aaf0acfa3daa8cd
2023-04-28 09:44:05 -06:00
595fbe4eca Force CI again
Former-commit-id: 401ab334f00273307f64397f06f2b295c1151085
2023-04-20 20:17:19 -06:00
3e949b403f Force CI again
Former-commit-id: fa822a71297ad39d5f8301321e7230f55bb0cb27
2023-04-20 19:06:20 -06:00
5524e95434 Force CI to run
Former-commit-id: 99ecc01e52eda6bf162679bc0dda79c0438b14cb
2023-04-20 18:24:45 -06:00
616982d9ba Merge branch 'main' into ci-test
Former-commit-id: b3b24e3f1870763025d9ac9b07685b1a85567874
2023-04-20 17:40:41 -06:00
2cbb6e1f1d Add debug output
Former-commit-id: 27d23144e4003fa131a7fc95b7f527848b6181ad
2023-04-20 15:00:20 -06:00
0712012cf4 Start docker inside the executor
Former-commit-id: 2948691fc712898c4ad04bbf11296f8ecbbd5b0b
2023-04-20 13:58:20 -06:00
13 changed files with 4 additions and 268 deletions

View File

@ -1,54 +0,0 @@
name: Container Registry Test
on:
push:
branches: '*'
paths:
- '!**'
- '.gitea/workflows/triggers/test-container-registry'
- '.gitea/workflows/test-container-registry.yml'
- 'tests/container-registry/run-test.sh'
schedule: # Note: coordinate with other tests to not overload runners at the same time of day
- cron: '6 19 * * *'
jobs:
test:
name: "Run contaier registry hosting test on kind/k8s"
runs-on: ubuntu-22.04
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: "Check cgroups version"
run: mount | grep cgroup
- name: "Install kind"
run: ./tests/scripts/install-kind.sh
- name: "Install Kubectl"
run: ./tests/scripts/install-kubectl.sh
- name: "Install ed" # Only needed until we remove the need to edit the spec file
run: apt update && apt install -y ed
- name: "Run container registry deployment test"
run: |
source /opt/bash-utils/cgroup-helper.sh
join_cgroup
./tests/container-registry/run-test.sh

View File

@ -48,5 +48,5 @@ jobs:
run: | run: |
source /opt/bash-utils/cgroup-helper.sh source /opt/bash-utils/cgroup-helper.sh
join_cgroup join_cgroup
./tests/database/run-test.sh CERC_SCRIPT_DEBUG=1 ./tests/database/run-test.sh

View File

@ -1 +0,0 @@
Change this file to trigger running the test-container-registry CI job

View File

@ -12,8 +12,8 @@ spec_file_name="${stack_name}-spec.yml"
deployment_dir_name="${stack_name}-deployment" deployment_dir_name="${stack_name}-deployment"
rm -f ${spec_file_name} rm -f ${spec_file_name}
rm -rf ${deployment_dir_name} rm -rf ${deployment_dir_name}
laconic-so --stack ${stack_name} deploy --deploy-to compose init --output ${spec_file_name} laconic-so --stack ${stack_name} deploy --deploy-to k8s-kind init --output ${spec_file_name}
laconic-so --stack ${stack_name} deploy --deploy-to compose create --deployment-dir ${deployment_dir_name} --spec-file ${spec_file_name} laconic-so --stack ${stack_name} deploy --deploy-to k8s-kind create --deployment-dir ${deployment_dir_name} --spec-file ${spec_file_name}
#laconic-so deployment --dir ${deployment_dir_name} start #laconic-so deployment --dir ${deployment_dir_name} start
#laconic-so deployment --dir ${deployment_dir_name} ps #laconic-so deployment --dir ${deployment_dir_name} ps
#laconic-so deployment --dir ${deployment_dir_name} stop #laconic-so deployment --dir ${deployment_dir_name} stop

View File

@ -27,7 +27,7 @@ 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, stack_is_external, warn_exit from stack_orchestrator.util import include_exclude_check, get_parsed_stack_config, stack_is_external
from stack_orchestrator.base import get_npm_registry_url from stack_orchestrator.base import get_npm_registry_url
# TODO: find a place for this # TODO: find a place for this
@ -164,8 +164,6 @@ def command(ctx, include, exclude, force_rebuild, extra_build_args):
containers_in_scope = [] containers_in_scope = []
if stack: if stack:
stack_config = get_parsed_stack_config(stack) stack_config = get_parsed_stack_config(stack)
if "containers" not in stack_config or stack_config["containers"] is None:
warn_exit(f"stack {stack} does not define any containers")
containers_in_scope = stack_config['containers'] containers_in_scope = stack_config['containers']
else: else:
containers_in_scope = all_containers containers_in_scope = all_containers

View File

@ -1,13 +0,0 @@
services:
registry:
image: registry:2.8
restart: always
environment:
REGISTRY_LOG_LEVEL: ${REGISTRY_LOG_LEVEL}
volumes:
- registry-data:/var/lib/registry
ports:
- "5000"
volumes:
registry-data:

View File

@ -1,12 +0,0 @@
version: "3.2"
services:
mars:
image: cerc/mars-v2:local
restart: always
ports:
- "3000:3000"
environment:
- URL_OSMOSIS_REST=https://lcd-osmosis.blockapsis.com
- URL_OSMOSIS_RPC=https://rpc-osmosis.blockapsis.com
- WALLET_CONNECT_ID=0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x

View File

@ -1,4 +0,0 @@
#!/usr/bin/env bash
# Build the mars-v2 image
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
docker build -t cerc/mars-v2:local -f ${CERC_REPO_BASE_DIR}/mars-v2-frontend/Dockerfile ${build_command_args} ${CERC_REPO_BASE_DIR}/mars-v2-frontend

View File

@ -1,3 +0,0 @@
# Container Registry Stack
Host a container image registry

View File

@ -1,5 +0,0 @@
version: "1.0"
name: container-registry
description: "Container registry stack"
pods:
- container-registry

View File

@ -1,16 +0,0 @@
# mars
On a fresh Digital Ocean droplet with Ubuntu:
```
git clone https://github.com/cerc-io/stack-orchestrator
cd stack-orchestrator
./scripts/quick-install-linux.sh
```
Read and follow the instructions output from the above output to complete installation, then:
```
laconic-so --stack mars-v2 setup-repositories
laconic-so --stack mars-v2 build-containers
laconic-so --stack mars-v2 deploy up
```

View File

@ -1,8 +0,0 @@
version: "0.1"
name: mars-v2
repos:
- github.com/mars-protocol/mars-v2-frontend
containers:
- cerc/mars-v2
pods:
- mars-v2

View File

@ -1,146 +0,0 @@
#!/usr/bin/env bash
set -e
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x
# Dump environment variables for debugging
echo "Environment variables:"
env
fi
stack="container-registry"
# Helper functions: TODO move into a separate file
wait_for_pods_started () {
for i in {1..50}
do
local ps_output=$( $TEST_TARGET_SO deployment --dir $test_deployment_dir ps )
if [[ "$ps_output" == *"Running containers:"* ]]; then
# if ready, return
return
else
# if not ready, wait
sleep 5
fi
done
# Timed out, error exit
echo "waiting for pods to start: FAILED"
delete_cluster_exit
}
wait_for_log_output () {
for i in {1..50}
do
local log_output=$( $TEST_TARGET_SO deployment --dir $test_deployment_dir logs )
if [[ ! -z "$log_output" ]]; then
# if ready, return
return
else
# if not ready, wait
sleep 5
fi
done
# Timed out, error exit
echo "waiting for pods log content: FAILED"
delete_cluster_exit
}
delete_cluster_exit () {
$TEST_TARGET_SO deployment --dir $test_deployment_dir stop --delete-volumes
exit 1
}
# Note: eventually this test should be folded into ../deploy/
# but keeping it separate for now for convenience
TEST_TARGET_SO=$( ls -t1 ./package/laconic-so* | head -1 )
# Set a non-default repo dir
export CERC_REPO_BASE_DIR=~/stack-orchestrator-test/repo-base-dir
echo "Testing this package: $TEST_TARGET_SO"
echo "Test version command"
reported_version_string=$( $TEST_TARGET_SO version )
echo "Version reported is: ${reported_version_string}"
echo "Cloning repositories into: $CERC_REPO_BASE_DIR"
rm -rf $CERC_REPO_BASE_DIR
mkdir -p $CERC_REPO_BASE_DIR
$TEST_TARGET_SO --stack ${stack} setup-repositories
$TEST_TARGET_SO --stack ${stack} build-containers
# Test basic stack-orchestrator deploy to k8s
test_deployment_dir=$CERC_REPO_BASE_DIR/${stack}-deployment-dir
test_deployment_spec=$CERC_REPO_BASE_DIR/${stack}-deployment-spec.yml
$TEST_TARGET_SO --stack ${stack} deploy --deploy-to k8s-kind init --output $test_deployment_spec --config CERC_TEST_PARAM_1=PASSED
# Check the file now exists
if [ ! -f "$test_deployment_spec" ]; then
echo "deploy init test: spec file not present"
echo "deploy init test: FAILED"
exit 1
fi
echo "deploy init test: passed"
# Switch to a full path for bind mount.
volume_name="registry-data"
sed -i "s|^\(\s*${volume_name}:$\)$|\1 ${test_deployment_dir}/data/${volume_name}|" $test_deployment_spec
# Add ingress config to the spec file
ed $test_deployment_spec <<IngressSpec
/network:/
a
http-proxy:
- host-name: localhost
routes:
- path: /
proxy-to: registry:5000
.
w
q
IngressSpec
$TEST_TARGET_SO --stack ${stack} deploy create --spec-file $test_deployment_spec --deployment-dir $test_deployment_dir
# Check the deployment dir exists
if [ ! -d "$test_deployment_dir" ]; then
echo "deploy create test: deployment directory not present"
echo "deploy create test: FAILED"
exit 1
fi
echo "deploy create test: passed"
# Note: this isn't strictly necessary, except we end up trying to push the image into
# the kind cluster then fails because it can't be found locally
docker pull registry:2.8
# Try to start the deployment
$TEST_TARGET_SO deployment --dir $test_deployment_dir start
wait_for_pods_started
# Check logs command works
wait_for_log_output
sleep 1
log_output_3=$( $TEST_TARGET_SO deployment --dir $test_deployment_dir logs )
if [[ "$log_output_3" == *"listening on"* ]]; then
echo "deployment logs test: passed"
else
echo "deployment logs test: FAILED"
echo $log_output_3
delete_cluster_exit
fi
# Check that we can use the registry
# Note: since this pulls from the DockerCo registry without auth it's possible it'll run into rate limiting issues
docker pull hello-world
docker tag hello-world localhost:80/hello-world
docker push localhost:80/hello-world
# Then do a quick check that we actually pushed something there
# See: https://stackoverflow.com/questions/31251356/how-to-get-a-list-of-images-on-docker-registry-v2
registry_response=$(curl -s -X GET http://localhost:80/v2/_catalog)
if [[ "$registry_response" == *"{\"repositories\":[\"hello-world\"]}"* ]]; then
echo "registry content test: passed"
else
echo "registry content test: FAILED"
echo $registry_response
delete_cluster_exit
fi
# Stop and clean up
$TEST_TARGET_SO deployment --dir $test_deployment_dir stop --delete-volumes
echo "Test passed"