Skip to content

Commit

Permalink
fix: preload docker images on cube
Browse files Browse the repository at this point in the history
Signed-off-by: Rodney Osodo <[email protected]>
  • Loading branch information
rodneyosodo committed Nov 29, 2024
1 parent 7a84cce commit ec0d3e6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 57 deletions.
27 changes: 2 additions & 25 deletions hal/buildroot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,31 +50,8 @@ VEK signed the Attestation Report!
Measurement from SNP Attestation Report: daa2e216eafd8c6404b72157a130500ab0c0944064c8e1009ebf5e910371caf57a6711654108a01a69baaa1a05759cf0
```

Clone the repository. Since this is a private repository, you need to create a classic personal access token with `repo` and `read:packages` permissions.
By default the docker images have been pulled from docker registry and the the docker composition has been started. The folder which contains the docker compose file is at `/mnt/docker/cube/docker`. To see the running containers, run the following command:

```bash
git clone https://github.com/ultravioletrs/cube.git
```

Your username is your github username and your password is the access token you generated in step above.

Login to the docker registry

```bash
docker login ghcr.io
```

Your username is your github username and your password is the access token you generated in step above.

Pull the docker images

```bash
cd cube/docker/
docker compose pull
```

Start the docker composition

```bash
docker compose up -d
docker ps -a
```
7 changes: 7 additions & 0 deletions hal/buildroot/linux/systemd/setup-cube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,10 @@ tee /etc/docker/daemon.json > /dev/null <<EOF
EOF

systemctl start docker

# Setup Cube AI
cd /mnt/docker
git clone https://github.com/ultravioletrs/cube.git
cd cube/docker
docker compose pull
docker compose up -d
34 changes: 2 additions & 32 deletions hal/ubuntu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,8 @@ This directory contains the cloud-init configuration files for Cube AI.

## After the first boot

1. Generate access token from github to be able to pull the docker images and code from github
2. Login to the docker registry
For local development, replace the following IP address entries in `docker/.env` with the IP address of the qemu virtual machine as follows:

```bash
docker login ghcr.io
```

Your username is your github username and your password is the access token you generated in step 1.

3. Clone the repository

```bash
git clone https://github.com/ultravioletrs/cube.git
```

Your username is your github username and your password is the access token you generated in step 1.

4. Pull the docker images

```bash
cd cube/docker/
docker compose pull
```

5. For local development, replace the following IP address entries in `docker/.env` with your local IP address as follows:

```bash
UV_CUBE_NEXTAUTH_URL=http://localhost:${UI_PORT}
```

6. Start the docker containers

```bash
docker compose up -d
UV_CUBE_NEXTAUTH_URL=http://<ip-address>:${UI_PORT}
```
4 changes: 4 additions & 0 deletions hal/ubuntu/qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ runcmd:
- groupadd docker
- usermod -aG docker $USER
- newgrp docker
- git clone https://github.com/ultravioletrs/cube.git
- cd cube/docker
- docker compose pull
- docker compose up -d
final_message: "Docker installation complete."
EOF
Expand Down

0 comments on commit ec0d3e6

Please sign in to comment.