Skip to content

Commit 2860da0

Browse files
Address review feedback: remove templates, move nvm to developer.sh, remove telegraf and microk8s
Co-authored-by: prasadtalasila <9206466+prasadtalasila@users.noreply.github.com>
1 parent 3e3b5c8 commit 2860da0

File tree

11 files changed

+58
-361
lines changed

11 files changed

+58
-361
lines changed

deploy/vagrant/CHANGELOG.md

Lines changed: 0 additions & 139 deletions
This file was deleted.

deploy/vagrant/make_boxes/dtaas/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ are not a developer, no changes are required to the `Vagrantfile`.
3434
This vagrant box installed for users will have the following items:
3535

3636
* docker (with docker compose plugin)
37-
* nodejs v22 (via nvm)
37+
* nodejs v20.10
3838
* yarn v1.22
39-
* npm global packages: serve, pm2, madge
40-
* python3 with venv
39+
* npm v10.2
40+
* python3 with pip
4141
* containers
4242
* ml-workspace-minimal v0.13.2
4343
* traefik v2.10
@@ -51,14 +51,14 @@ This vagrant box installed for users will have the following items:
5151
This vagrant box installed for developers will have
5252
the following items additional items:
5353

54-
* microk8s v1.27
54+
* nodejs v22 (via nvm)
55+
* npm global packages: serve, pm2, madge
5556
* jupyterlab (in python venv)
5657
* mkdocs (in python venv)
5758
* shellcheck
5859
* markdownlint (mdl)
5960
* graphviz
6061
* containers
61-
* telegraf v1.28.2
6262
* gitlab-runner alpine-v17.5.3
6363

6464
The upcoming instructions will help with the creation of

deploy/vagrant/make_boxes/dtaas/developer.sh

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,27 @@ apt-get upgrade -y
1212
# mkcert can be installed from: https://github.com/FiloSottile/mkcert
1313
apt-get install -y wget openssl
1414

15+
# Install nodejs using nvm
16+
apt-get install -y ca-certificates curl gnupg
17+
18+
# Install nvm for vagrant user
19+
sudo -u vagrant bash -c 'curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash'
20+
sudo -u vagrant bash -c 'export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && nvm install 22 && nvm use 22 && nvm alias default 22'
21+
22+
# Install yarn
23+
if [ ! -f /usr/share/keyrings/yarnkey.gpg ]
24+
then
25+
curl -sL "https://dl.yarnpkg.com/debian/pubkey.gpg" | gpg --dearmor | \
26+
tee /usr/share/keyrings/yarnkey.gpg >/dev/null
27+
printf "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main \n" | \
28+
tee /etc/apt/sources.list.d/yarn.list
29+
fi
30+
apt-get update -y
31+
apt-get install -y yarn
32+
33+
# Install global npm packages
34+
sudo -u vagrant bash -c 'export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && npm install -g serve pm2 madge'
35+
1536
# Install playwright tool for integration tests on browsers
1637
npx --yes playwright install-deps
1738

@@ -21,14 +42,7 @@ printf "\n\n Install jupyterlab and mkdocs"
2142
sudo -u vagrant bash -c 'cd /home/vagrant && python3 -m venv ./dtaas-venv'
2243
sudo -u vagrant bash -c 'cd /home/vagrant && ./dtaas-venv/bin/pip3 install jupyterlab mkdocs mkdocs-material python-markdown-math mkdocs-open-in-new-tab mkdocs-with-pdf qrcode'
2344

24-
# Install minimal Kubernetes cluster
25-
snap install microk8s --classic
26-
usermod -a -G microk8s vagrant
27-
chown -f -R vagrant ~/.kube
28-
newgrp microk8s
29-
3045
# get the required docker images
31-
docker pull telegraf:1.28.2
3246
docker pull gitlab/gitlab-runner:alpine-v17.5.3
3347

3448
# Install markdownlint
@@ -40,4 +54,4 @@ sudo apt-get install -y shellcheck
4054

4155
# Install madge for generating dependency graphs of typescript projects
4256
sudo apt-get install -y graphviz
43-
# madge is already installed via npm in user.sh
57+
# madge is already installed via npm above

deploy/vagrant/make_boxes/dtaas/user.sh

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ apt-get install -y \
1515
apache2-utils \
1616
net-tools \
1717
python3-dev \
18-
python3-pip \
19-
python3-venv
18+
python3-pip
2019

2120
mkdir -p /etc/apt/keyrings
2221
if [ ! -f /etc/apt/keyrings/docker.gpg ]
@@ -40,14 +39,22 @@ docker run hello-world
4039
systemctl enable docker.service
4140
systemctl enable containerd.service
4241

43-
# Install nodejs using nvm
42+
apt-get update
4443
apt-get install -y ca-certificates curl gnupg
44+
mkdir -p /etc/apt/keyrings
45+
if [ ! -f /etc/apt/keyrings/nodesource.gpg ]
46+
then
47+
curl -fsSL "https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key" | \
48+
gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
49+
fi
50+
NODE_MAJOR=20
51+
printf "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] \
52+
https://deb.nodesource.com/node_%s.x nodistro main" "$NODE_MAJOR" | \
53+
tee /etc/apt/sources.list.d/nodesource.list
54+
apt-get update
55+
apt-get install -y nodejs
56+
npm install -g npm@10.2.0
4557

46-
# Install nvm for vagrant user
47-
sudo -u vagrant bash -c 'curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash'
48-
sudo -u vagrant bash -c 'export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && nvm install 22 && nvm use 22 && nvm alias default 22'
49-
50-
# Install yarn
5158
if [ ! -f /usr/share/keyrings/yarnkey.gpg ]
5259
then
5360
curl -sL "https://dl.yarnpkg.com/debian/pubkey.gpg" | gpg --dearmor | \
@@ -57,9 +64,7 @@ then
5764
fi
5865
apt-get update -y
5966
apt-get install -y yarn
60-
61-
# Install global npm packages
62-
sudo -u vagrant bash -c 'export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && npm install -g serve pm2 madge'
67+
npm install -g serve
6368

6469
cat /vagrant/vagrant.pub >> /home/vagrant/.ssh/authorized_keys
6570
mkdir -p /root/.ssh

deploy/vagrant/single-machine/README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,12 @@ Please follow these steps to make this work in your local environment.
1818
This shall be useful for logging into the vagrant machine
1919
created for single-machine deployment.
2020

21-
1. Copy the Vagrantfile template and customize it:
22-
```bash
23-
cp ../templates/Vagrantfile.single-machine.template Vagrantfile
24-
```
25-
Update the **Vagrantfile** as needed. Fields to customize are:
21+
1. Update the **Vagrantfile**. Fields to update are:
2622
1. Hostname (`node.vm.hostname = "foo.com"`)
2723
1. MAC address (`:mac => "xxxxxxxx"`). This change is required
2824
if you have a DHCP server assigning domain names based on MAC
2925
address. Otherwise, you can leave this field unchanged.
30-
1. Path to vagrant private key (`node.ssh.private_key_path = "vagrant"`)
3126
1. Other adjustments are optional.
32-
3327
1. Execute the following commands from terminal
3428

3529
```bash

deploy/vagrant/templates/README.md

Lines changed: 0 additions & 63 deletions
This file was deleted.

deploy/vagrant/templates/Vagrantfile.make-box.template

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)