Skip to content
Snippets Groups Projects
Verified Commit 721806ae authored by Hamza Remmal's avatar Hamza Remmal :homes:
Browse files

chore: add local registry as a service

parent a0be6895
No related branches found
No related tags found
1 merge request!322chore: add local registry as a service
Pipeline #256166 passed
mirrors:
autograde.io:
endpoint:
- "http://registry:5000"
configs:
"autograde.io":
tls:
insecure_skip_verify: true
services: services:
registry:
image: registry:2
ports:
- "5001:5000"
volumes:
- registry-data:/var/lib/registry
networks:
autograde-network:
moodle-db: moodle-db:
container_name: moodle-db container_name: moodle-db
image: mysql:8.0.33 image: mysql:8.0.33
...@@ -47,6 +55,7 @@ services: ...@@ -47,6 +55,7 @@ services:
volumes: volumes:
- kubernetes:/var/lib/rancher/k3s - kubernetes:/var/lib/rancher/k3s
- kubernetes-config:/config - kubernetes-config:/config
- ./.devcontainer/config/registries.yaml:/etc/rancher/k3s/registries.yaml:ro
ports: ports:
- "6443:6443" # Kubernetes API Server - "6443:6443" # Kubernetes API Server
networks: networks:
...@@ -72,7 +81,7 @@ services: ...@@ -72,7 +81,7 @@ services:
AUTOGRADE_JOB_NAMESPACE: default AUTOGRADE_JOB_NAMESPACE: default
AUTOGRADE_JOB_IMAGE_PULL-POLICY: IFNOTPRESENT AUTOGRADE_JOB_IMAGE_PULL-POLICY: IFNOTPRESENT
AUTOGRADE_JOB_TTL: 172800 AUTOGRADE_JOB_TTL: 172800
AUTOGRADE_MANAGER_IMAGE: autograde/submission-manager:1.2.4 AUTOGRADE_MANAGER_IMAGE: autograde.io/autograde/submission-manager:local-dev
AUTOGRADE_MANAGER_PULL-POLICY: IFNOTPRESENT AUTOGRADE_MANAGER_PULL-POLICY: IFNOTPRESENT
volumes: volumes:
- kubernetes-config:/config - kubernetes-config:/config
...@@ -82,6 +91,7 @@ services: ...@@ -82,6 +91,7 @@ services:
volumes: volumes:
moodle-db-data: moodle-db-data:
moodle-data: moodle-data:
registry-data:
kubernetes: kubernetes:
kubernetes-agent: kubernetes-agent:
kubernetes-config: kubernetes-config:
......
...@@ -34,13 +34,22 @@ This is done by adding the line `127.0.0.1 moodle` to [/etc/host](https://en ...@@ -34,13 +34,22 @@ This is done by adding the line `127.0.0.1 moodle` to [/etc/host](https://en
make add-host make add-host
``` ```
### Step 3: Access The Services ### Step 3: Push the Submission's Manager to the registry
The following configuration requires to push to a remote registry (locally deployed)
each change that happens in the [](../autograde-submission-manager) project.
```shell
docker buildx build --push -t localhost:5001/autograde/submission-manager:local-dev autograde-submission-manager/
```
### Step 4: Access The Services
The local instance of Moodle is accessible at http://moodle. The local instance of Moodle is accessible at http://moodle.
The autograde service is reachable at http://localhost:8082/api/v1/ping. The autograde service is reachable at http://localhost:8082/api/v1/ping.
### Step 4: Moodle Installation ### Step 5: Moodle Installation
At this point, you should see the following webpage when accessing http://moodle: At this point, you should see the following webpage when accessing http://moodle:
...@@ -49,13 +58,13 @@ At this point, you should see the following webpage when accessing http://moodle ...@@ -49,13 +58,13 @@ At this point, you should see the following webpage when accessing http://moodle
Go through the [installation step](https://docs.moodle.org/404/en/Installing_Moodle#Web_based_installer). Go through the [installation step](https://docs.moodle.org/404/en/Installing_Moodle#Web_based_installer).
You can enter whatever value you want for the required fields. You can enter whatever value you want for the required fields.
### Step 5: Moodle Configuration ### Step 6: Moodle Configuration
Now that Moodle is installed, follow the instruction in [moodle_config.md](./moodle_config.md) to configure the Moodle instance. Now that Moodle is installed, follow the instruction in [moodle_config.md](./moodle_config.md) to configure the Moodle instance.
At this point, you should have a local instance of the Moodle autograde cluster configured and running. At this point, you should have a local instance of the Moodle autograde cluster configured and running.
### Step 6: To Go Further ### Step 7: To Go Further
Now that a local instance of the autograde cluster is set up, Now that a local instance of the autograde cluster is set up,
you can experiment with creating classes and auto-graded homeworks. you can experiment with creating classes and auto-graded homeworks.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment