Skip to content

Commit

Permalink
refactor: use bash script for installation
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian2012 committed Oct 24, 2024
1 parent 04f67e9 commit 86a6cc8
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 30 deletions.
36 changes: 9 additions & 27 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,38 +42,20 @@ jobs:
helm install harmony --namespace openedx-harmony --create-namespace -f integration-test/${{matrix.cluster}}/values.yaml charts/harmony-chart
kubectl rollout status deployment --timeout 300s
- name: Setup domain
- name: Healthcheck
run: |
kubectl get pods
curl http://localhost/cluster-echo-test
sleep 2
curl http://harmony.test/cluster-echo-test
- name: Logs
run: |
kubectl logs -f --tail 10 deployment/harmony-ingress-nginx-controller
kubectl logs -f --tail 10 deployment/cluster-echo-test
- name: setup python
uses: actions/setup-python@v5
with:
python-version: 3.12

# - name: Install openedx
# run: |
# export INSTALLATIONS=$(ls -d integration-test/${{matrix.cluster}}/*/)
# export CI_ROOT=$(pwd)
# for i in $(ls -d integration-test/cluster-01/*/)
# do
# echo "Running for installation $i"
# cd $i
# export TUTOR_PLUGINS_ROOT=$(pwd)/plugins/ export TUTOR_ROOT=$(pwd)
# python3 -m venv venv && source venv/bin/activate
# pip install -r $TUTOR_ROOT/requirements.txt
# tutor config save
# tutor plugins enable k8s_harmony
# tutor k8s start
# tutor k8s init
# cd $CI_ROOT
# deactivate
# done
- name: Install openedx
run: |
export INSTALLATIONS=$(ls -d integration-test/${{matrix.cluster}}/*/)
export CI_ROOT=$(pwd)
for installation in $(ls -d integration-test/${{matrix.cluster}}/*/)
do
bash integration-test/environment.sh $installation
done
2 changes: 0 additions & 2 deletions integration-test/cluster-01/openedx-01/Makefile

This file was deleted.

66 changes: 65 additions & 1 deletion integration-test/cluster-01/openedx-01/config.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,66 @@
K8S_NAMESPACE: openedx-01
CMS_OAUTH2_SECRET: kWYPh15ecORZ75TvEqtzfgh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9H3WcbSZTnVNfJ2QgY8b4uV7L8JetZs/jeF2X9Gkzi4Xa
UGs1N/DUGsZD1xPnTHCxGnt678oAbjIyLxVndk8CgYAON0uVm7AsXMh9XhjgGAYI
ajM62/oJhCOXaG7gptqjqb5Cij/8In+1pw5P/y58vKwbnhx4PomUQa658Sb4HcD4
W/qdgjGb94Ouj3ReeWl+mvOkN8KYFfrQSb9dk7rvoi2+QIcyIcCYEkEDsyGBYQ4i
CyPbaxWvopSdK63BVMVuSQKBgQDY8P3krEC5NZ0qw3rTizWk6iPMHU14txOOOvbh
kA3yz+MQISu5o/lZ3V0ri8uk2CGqT64rALGQxr/rwYXUAcuQR5wQQYmBV49h4vWx
3yHg0GZ11BfFHuRxCvP9OLmKXAr4esOmoPu+t7xMZjIoiWn/5DLMyua8EbtFvd+U
w2qcKQKBgBmTe8NzvMxKstgDcElCnpqFv1e2JVLofXIsrW+07r8qhPywfXIiloR9
JRaR1CjsA4ZsU5n+2fISx8RvZqnrYvsSLFrkW9U6iSkJJwSR0gTJb3sNaxpfv1uT
/GdzMnP1gM/V41wm28/LP6s9Z95tiwXjkHEBhIjYGbWi6DRz22jd
-----END RSA PRIVATE KEY-----'
K8S_HARMONY_NAMESPACE: openedx-harmony
K8S_NAMESPACE: openedx-01
MYSQL_ROOT_PASSWORD: c7SVvBJl
OPENEDX_MYSQL_PASSWORD: M4CBFYO9
OPENEDX_SECRET_KEY: dskQ9UXPKcsSi2molXmggxID
PLUGINS:
- indigo
- k8s_harmony
- mfe
PLUGIN_INDEXES:
- https://overhang.io/tutor/main
2 changes: 2 additions & 0 deletions integration-test/cluster-01/openedx-01/post-installation.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Run any arbitrary commands necessary to verify the installation is working
echo "Make sure to change this script to verify your installation is tested correctly"
18 changes: 18 additions & 0 deletions integration-test/environment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
cd $1

# Setup environment
export TUTOR_PLUGINS_ROOT=$(pwd)/plugins/ export TUTOR_ROOT=$(pwd)
python3 -m venv venv && source venv/bin/activate
pip install -r $TUTOR_ROOT/requirements.txt

# Start/init installation
tutor config save
tutor plugins enable k8s_harmony
tutor k8s start
tutor k8s init

bash ./post-installation.sh

# Go back
deactivate
cd $CI_ROOT

0 comments on commit 86a6cc8

Please sign in to comment.