diff --git a/.devcontainer/config/registries.yaml b/.devcontainer/config/registries.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2e8876abe31413638fb35d2fc34b129aae1ed9ab --- /dev/null +++ b/.devcontainer/config/registries.yaml @@ -0,0 +1,8 @@ +mirrors: + autograde.io: + endpoint: + - "http://registry:5000" +configs: + "autograde.io": + tls: + insecure_skip_verify: true diff --git a/docker-compose.yaml b/docker-compose.yaml index d0d2056bd4d8abe162e52a22c49afdec0b118669..4bdfa03e7cb3cff593e2fbc5456fd9f0f9ea7bd5 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,4 +1,12 @@ services: + registry: + image: registry:2 + ports: + - "5001:5000" + volumes: + - registry-data:/var/lib/registry + networks: + autograde-network: moodle-db: container_name: moodle-db image: mysql:8.0.33 @@ -47,6 +55,7 @@ services: volumes: - kubernetes:/var/lib/rancher/k3s - kubernetes-config:/config + - ./.devcontainer/config/registries.yaml:/etc/rancher/k3s/registries.yaml:ro ports: - "6443:6443" # Kubernetes API Server networks: @@ -72,7 +81,7 @@ services: AUTOGRADE_JOB_NAMESPACE: default AUTOGRADE_JOB_IMAGE_PULL-POLICY: IFNOTPRESENT 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 volumes: - kubernetes-config:/config @@ -82,6 +91,7 @@ services: volumes: moodle-db-data: moodle-data: + registry-data: kubernetes: kubernetes-agent: kubernetes-config: diff --git a/docs/dev_setup.md b/docs/dev_setup.md index ff494bbc2d786ea61bfab3bb0dec894dd742e385..3509428f3388f0a47b0a46c38f4421f77240fd49 100644 --- a/docs/dev_setup.md +++ b/docs/dev_setup.md @@ -34,13 +34,22 @@ This is done by adding the line `127.0.0.1 moodle` to [/etc/host](https://en 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 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: @@ -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). 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. 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, you can experiment with creating classes and auto-graded homeworks.