Skip to content

Commit

Permalink
updated dashboard suite with mnt/disk for mountpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
mik-tf committed Jul 24, 2024
1 parent 97432a0 commit 73ff05a
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 12 deletions.
2 changes: 1 addition & 1 deletion tfgrid3/dashboard_suite/Caddyfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
${DOMAIN}

file_server {
root /tmp/webserver
root /mnt/disk/tmp/webpage
}
6 changes: 4 additions & 2 deletions tfgrid3/dashboard_suite/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ RUN curl -fsSL https://get.docker.com -o /usr/local/bin/install-docker.sh && \

RUN sh /usr/local/bin/install-docker.sh

RUN mkdir -p /code && \
cd /code && \
RUN mkdir -p /mnt/disk/code && \
cd /mnt/disk/code && \
git clone https://github.com/threefoldtech/grid_deployment

RUN mkdir -p /mnt/disk/docker

COPY ./Caddyfile /etc/caddy/
COPY ./scripts/ /scripts/
COPY ./zinit/ /etc/zinit/
Expand Down
8 changes: 6 additions & 2 deletions tfgrid3/dashboard_suite/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,15 @@ You could also use Terraform instead of the Dashboard to deploy the Dashboard Su
https://hub.grid.tf/tf-official-apps/threefoldtech-dashboard_suite-latest.flist
```
* Under `Entry Point`, the following should be set by default: `/sbin/zinit init`
* `Select instance capacity` should be at 8 vcores, 1000GB of SSD and 32GB of RAM.
* `Select instance capacity` should be at 8 vcores, 50GB of SSD and 32GB of RAM.
* Make sure that `IPv4` and `IPv6` are enabled (required).
* In the tab `Environment Variables`. Click on the `plus` button then add 3 variables:
* In the tab `Environment Variables`, click on the `plus` button then add 3 variables:
* `DOMAIN` for `Name` and your domain (e.g. `example.com`) for `Value`.
* `SEED` for `Name` and your TF seed phrase of the network you want to deploy the Dashboard Suite on (main, dev or test) (e.g. `main`) for `Value`.
* In the tab `Disks`, click on the `plus` button then add the disk:
* `Name`: choose a name
* `Size (GB)`: choose a size, minimum 750 GB
* `Mount Point`: `/mnt/disk`
* Click `Deploy`.
## DNS Settings
Expand Down
2 changes: 1 addition & 1 deletion tfgrid3/dashboard_suite/scripts/dashboard_suite.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# Go to the network directory
cd /code/grid_deployment/docker-compose/${NETWORK}net
cd /mnt/disk/code/grid_deployment/docker-compose/${NETWORK}net

git checkout branch development_pv_2

Expand Down
10 changes: 5 additions & 5 deletions tfgrid3/dashboard_suite/scripts/webpage.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash

mkdir -p /tmp/webpage
mkdir -p /mnt/disk/tmp/webpage

echo '<h1>This is the start page for the Dashboard Suite Deployment. Refresh the page for updates</h1>' > /tmp/webpage/heading.html
touch /tmp/webpage/log
echo '<h1>This is the start page for the Dashboard Suite Deployment. Refresh the page for updates</h1>' > /mnt/disk/tmp/webpage/heading.html
touch /mnt/disk/tmp/webpage/log

while true; do
cat /tmp/webpage/heading.html > /tmp/webpage/index.html
cat /tmp/webpage/log | sed "s/\r/\n/g" | tail -n 1 >> /tmp/webpage/index.html
cat /mnt/disk/tmp/webpage/heading.html > /mnt/disk/tmp/webpage/index.html
cat /mnt/disk/tmp/webpage/log | sed "s/\r/\n/g" | tail -n 1 >> /mnt/disk/tmp/webpage/index.html
sleep 1
done
2 changes: 1 addition & 1 deletion tfgrid3/dashboard_suite/zinit/dockerd.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
exec: /usr/bin/dockerd --data-root /mnt/data/docker
exec: /usr/bin/dockerd --data-root /mnt/disk/docker

0 comments on commit 73ff05a

Please sign in to comment.