Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 54 additions & 45 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,37 +15,7 @@ jobs:
ep_weave: [false, true]
nbsearch: [false, true]
jenkins: [false, true]
include:
- ep_weave: false
nbsearch: false
jenkins: false
compose_files: ''
label: 'default'
- ep_weave: true
nbsearch: false
jenkins: false
compose_files: '-f docker-compose.yml -f docker-compose.ep_weave.yml'
label: 'ep_weave'
- nbsearch: true
ep_weave: false
jenkins: false
compose_files: '-f docker-compose.yml -f docker-compose.nbsearch.yml'
label: 'nbsearch'
- ep_weave: true
nbsearch: true
jenkins: false
compose_files: '-f docker-compose.yml -f docker-compose.ep_weave.yml -f docker-compose.nbsearch.yml'
label: 'ep_weave-and-nbsearch'
- ep_weave: false
nbsearch: false
jenkins: true
compose_files: '-f docker-compose.yml -f docker-compose.jenkins.yml'
label: 'jenkins'
- ep_weave: true
nbsearch: true
jenkins: true
compose_files: '-f docker-compose.yml -f docker-compose.ep_weave.yml -f docker-compose.nbsearch.yml -f docker-compose.jenkins.yml'
label: 'all-services'
ubuntu_version: ['22.04', '24.04']
exclude:
- ep_weave: false
nbsearch: false
Expand All @@ -56,10 +26,47 @@ jobs:
- ep_weave: false
nbsearch: true
jenkins: true
runs-on: ubuntu-22.04
name: Build and Test (${{ matrix.label }})

runs-on: ubuntu-${{ matrix.ubuntu_version }}
name: Build and Test ${{ matrix.nbsearch == true && '+nbsearch ' || '' }}${{ matrix.ep_weave == true && '+ep_weave ' || '' }}${{ matrix.jenkins == true && '+jenkins ' || '' }}on ubuntu-${{ matrix.ubuntu_version }}
Comment thread
yacchin1205 marked this conversation as resolved.

steps:
- uses: actions/checkout@v4
- name: Set label and compose_files
id: setup
run: |
set -xe
Comment thread
yacchin1205 marked this conversation as resolved.

label="default"
compose_files="-f docker-compose.yml"

if ${{ matrix.ep_weave }}; then
compose_files="$compose_files -f docker-compose.ep_weave.yml"
label="ep_weave"
fi
if ${{ matrix.nbsearch }}; then
compose_files="$compose_files -f docker-compose.nbsearch.yml"
if [ "$label" = "ep_weave" ]; then
label="ep_weave-and-nbsearch"
else
label="nbsearch"
fi
fi
if ${{ matrix.jenkins }}; then
compose_files="$compose_files -f docker-compose.jenkins.yml"
if [ "$label" = "ep_weave-and-nbsearch" ]; then
label="all-services"
elif [ "$label" != "default" ]; then
label="${label}-and-jenkins"
else
label="jenkins"
fi
fi
label="${label}-${{ matrix.ubuntu_version }}"

echo "label=$label" >> $GITHUB_OUTPUT
echo "compose_files=$compose_files" >> $GITHUB_OUTPUT

- name: Install packages
run: |
set -xe
Expand Down Expand Up @@ -100,30 +107,32 @@ jobs:
set -xe

cat .env
sudo docker compose ${{ matrix.compose_files }} build
sudo docker compose ${{ matrix.compose_files }} up -d
sudo docker compose ${{ steps.setup.outputs.compose_files }} build
sudo docker compose ${{ steps.setup.outputs.compose_files }} up -d

- name: Wait for JupyterHub to start
run: |
set -xe

sudo docker compose ${{ matrix.compose_files }} ps
sudo docker compose ${{ steps.setup.outputs.compose_files }} ps
# waiting for jupyterhub to start
echo "Waiting for JupyterHub to start"
max_retries=10
while [ $max_retries -gt 0 ]; do
if sudo docker compose ${{ matrix.compose_files }} logs jupyterhub | grep -q "JupyterHub is now running"; then
if sudo docker compose ${{ steps.setup.outputs.compose_files }} logs jupyterhub | grep -q "JupyterHub is now running"; then
break
fi
max_retries=$((max_retries-1))
sleep 10
done
if ! sudo docker compose logs jupyterhub | grep -q "JupyterHub is now running"; then
echo "JupyterHub did not start"
sudo docker compose ${{ matrix.compose_files }} logs jupyterhub
sudo docker compose ${{ steps.setup.outputs.compose_files }} logs jupyterhub
exit 1
fi
sudo docker compose ${{ matrix.compose_files }} ps
sudo docker compose ${{ steps.setup.outputs.compose_files }} ps
# waiting for proxy to start

echo "Waiting for Proxy to start"
max_retries=10
while [ $max_retries -gt 0 ]; do
Expand All @@ -136,10 +145,10 @@ jobs:
done
if ! curl -s -o /dev/null -w "%{http_code}" --insecure https://localhost/hub/login | grep -q "200"; then
echo "Proxy did not start"
sudo docker compose ${{ matrix.compose_files }} logs proxy
sudo docker compose ${{ steps.setup.outputs.compose_files }} logs proxy
exit 1
fi
sudo docker compose ${{ matrix.compose_files }} ps
sudo docker compose ${{ steps.setup.outputs.compose_files }} ps
- name: Wait for ep_weave to start
if: matrix.ep_weave
run: |
Expand All @@ -157,7 +166,7 @@ jobs:
done
if ! curl -s -o /dev/null -w "%{http_code}" --insecure https://localhost/services/ep_weave | grep -q "301"; then
echo "ep_weave did not start"
sudo docker compose ${{ matrix.compose_files }} logs ep_weave
sudo docker compose ${{ steps.setup.outputs.compose_files }} logs ep_weave
exit 1
fi
- name: Wait for solr to start
Expand All @@ -177,7 +186,7 @@ jobs:
done
if ! curl -s -o /dev/null -w "%{http_code}" --insecure https://localhost/services/solr | grep -q "302"; then
echo "solr did not start"
sudo docker compose ${{ matrix.compose_files }} logs nbsearch-solr
sudo docker compose ${{ steps.setup.outputs.compose_files }} logs nbsearch-solr
exit 1
fi
- name: Wait for jenkins to start
Expand All @@ -197,7 +206,7 @@ jobs:
done
if ! curl -s -o /dev/null -w "%{http_code}" --insecure https://localhost/services/jenkins | grep -q "301"; then
echo "jenkins did not start"
sudo docker compose ${{ matrix.compose_files }} logs jenkins
sudo docker compose ${{ steps.setup.outputs.compose_files }} logs jenkins
exit 1
fi
- name: Install python for playwright-tests
Expand Down Expand Up @@ -248,7 +257,7 @@ jobs:
uses: actions/upload-artifact@v4
if: always()
with:
name: 'playwright-results-${{ matrix.label }}'
name: 'playwright-results-${{ steps.setup.outputs.label }}'
path: playwright-results
retention-days: 7

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ It serves the following features:
## Prerequisites

- A server you have root access
- Support CentOS 7, CentOS Stream 9, Rocky Linux 8 and 9, Ubuntu 22.04
- Support CentOS 7, CentOS Stream 9, Rocky Linux 8 and 9, Ubuntu 22.04 and 24.04
- Python 3.6 or later
- Docker Engine and Docker Compose
- TLS certificate and private key for HTTPS communication
Expand Down
2 changes: 1 addition & 1 deletion install-host-services.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ if printf '%s\n' $(echo ${ID_LIKE[@]}) | grep -qx "rhel"; then
elif [ $ID == "ubuntu" ]; then
apt-get update
apt-get install -y python3 python3-dev python3-pip inotify-tools
apt-get install -y python3-tornado
else
exit 1
fi
pip3 install tornado

# install service
install -m 644 host-service/ophubuser.py /usr/local/bin
Expand Down