From 1990e87b9b33c8e7c435b8a41aa9f608cd281d1f Mon Sep 17 00:00:00 2001 From: prasadtalasila Date: Sun, 8 Oct 2023 21:26:27 +0200 Subject: [PATCH] Updates install scripts --- client/script/clean.bash | 2 +- deploy/install.sh | 4 +- deploy/vagrant/make_boxes/dtaas/Vagrantfile | 3 +- deploy/vagrant/make_boxes/dtaas/provision.sh | 115 ------------------- docs/admin/trial.md | 2 +- servers/execution/runner/script/clean.bash | 2 +- servers/lib/script/clean.bash | 2 +- 7 files changed, 8 insertions(+), 122 deletions(-) delete mode 100755 deploy/vagrant/make_boxes/dtaas/provision.sh diff --git a/client/script/clean.bash b/client/script/clean.bash index dd1cdb9b2..5bcab1efd 100755 --- a/client/script/clean.bash +++ b/client/script/clean.bash @@ -1,2 +1,2 @@ #!/bin/bash -rm -rf build/ node_modules/ coverage/ playwright-report/ *.svg \ No newline at end of file +rm -rf build/ node_modules/ coverage/ playwright-report/ "*.svg" \ No newline at end of file diff --git a/deploy/install.sh b/deploy/install.sh index d50adc8e4..7767692f1 100755 --- a/deploy/install.sh +++ b/deploy/install.sh @@ -54,7 +54,7 @@ docker run -d \ -p 8090:8080 \ --name "ml-workspace-user1" \ -v "${TOP_DIR}/files/user1:/workspace" \ - -v "${TOP_DIR}/files/common:/workspace/common:ro" \ + -v "${TOP_DIR}/files/common:/workspace/common" \ --env AUTHENTICATE_VIA_JUPYTER="" \ --env WORKSPACE_BASE_URL="user1" \ --shm-size 512m \ @@ -65,7 +65,7 @@ docker run -d \ -p 8091:8080 \ --name "ml-workspace-user2" \ -v "${TOP_DIR}/files/user2:/workspace" \ - -v "${TOP_DIR}/files/common:/workspace/common:ro" \ + -v "${TOP_DIR}/files/common:/workspace/common" \ --env AUTHENTICATE_VIA_JUPYTER="" \ --env WORKSPACE_BASE_URL="user2" \ --shm-size 512m \ diff --git a/deploy/vagrant/make_boxes/dtaas/Vagrantfile b/deploy/vagrant/make_boxes/dtaas/Vagrantfile index 2767c042c..e37807bb5 100644 --- a/deploy/vagrant/make_boxes/dtaas/Vagrantfile +++ b/deploy/vagrant/make_boxes/dtaas/Vagrantfile @@ -12,6 +12,7 @@ Vagrant.configure("2") do |config| vb.cpus = 8 end - config.vm.provision "shell", path: "provision.sh" + config.vm.provision "shell", path: "user.sh" + #config.vm.provision "shell", path: "developer.sh" end diff --git a/deploy/vagrant/make_boxes/dtaas/provision.sh b/deploy/vagrant/make_boxes/dtaas/provision.sh deleted file mode 100755 index 588dc6d5d..000000000 --- a/deploy/vagrant/make_boxes/dtaas/provision.sh +++ /dev/null @@ -1,115 +0,0 @@ -#!/bin/bash -# Installs necessary packages to create the docker environment for -# executing the DTaaS application - -apt-get update -y -apt-get upgrade -y - -# https://docs.docker.com/engine/install/ubuntu/ -apt-get install -y \ - ca-certificates \ - curl \ - gnupg \ - lsb-release \ - zsh \ - apache2-utils \ - net-tools - -mkdir -p /etc/apt/keyrings -if [ ! -f /etc/apt/keyrings/docker.gpg ] -then - curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | gpg --dearmor -o /etc/apt/keyrings/docker.gpg - printf \ - "deb [arch=%s signed-by=/etc/apt/keyrings/docker.gpg] \ - https://download.docker.com/linux/ubuntu %s stable" \ - "$(dpkg --print-architecture)" "$(lsb_release -cs)" | \ - tee /etc/apt/sources.list.d/docker.list > /dev/null -fi - -apt-get update -y -apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin -groupadd docker || true -usermod -aG docker vagrant || true -newgrp docker || true -service docker start -docker run hello-world - -systemctl enable docker.service -systemctl enable containerd.service - -#install docker-compose from https://docs.docker.com/compose/install/other/ -curl -SL "https://github.com/docker/compose/releases/download/v2.20.3/docker-compose-linux-x86_64" \ - -o /usr/local/bin/docker-compose -ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose -chmod 755 /usr/local/bin/docker-compose /usr/bin/docker-compose - -apt-get update -apt-get install -y ca-certificates curl gnupg -mkdir -p /etc/apt/keyrings -if [ ! -f /etc/apt/keyrings/nodesource.gpg ] -then - curl -fsSL "https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key" | \ - gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -fi -NODE_MAJOR=18 -printf "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] \ - https://deb.nodesource.com/node_%s.x nodistro main" "$NODE_MAJOR" | \ - tee /etc/apt/sources.list.d/nodesource.list -apt-get update -apt-get install -y nodejs -npm install -g npm@10.2.0 - -if [ ! -f /usr/share/keyrings/yarnkey.gpg ] -then - curl -sL "https://dl.yarnpkg.com/debian/pubkey.gpg" | gpg --dearmor | \ - tee /usr/share/keyrings/yarnkey.gpg >/dev/null - printf "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main \n" | \ - tee /etc/apt/sources.list.d/yarn.list -fi -apt-get update -y -apt-get install -y yarn -npm install -g serve - -# Install openssl for certificate generation -apt-get install -y wget openssl - -# Install playwright tool for integration tests on browsers -npx playwright install-deps - -#------------- -printf "\n\n Install jupyterlab and mkdocs" -apt-get install -y python3-pip -pip install jupyterlab -pip install mkdocs -pip3 install mkdocs-material -pip3 install python-markdown-math -pip3 install mkdocs-open-in-new-tab -pip3 install mkdocs-with-pdf -pip3 install qrcode - -# Install minimal Kubernetes cluster -snap install microk8s --classic -usermod -a -G microk8s vagrant -chown -f -R vagrant ~/.kube -newgrp microk8s - -cat /vagrant/vagrant.pub >> /home/vagrant/.ssh/authorized_keys -mkdir -p /root/.ssh -cat /vagrant/vagrant.pub >> /root/.ssh/authorized_keys - -# get the required docker images -docker pull traefik:v2.10 -docker pull mltooling/ml-workspace:0.13.2 -docker pull grafana/grafana:10.1.4 -docker pull influxdb:2.7 -docker pull telegraf:1.28.2 -docker pull rabbitmq:3-management -docker pull eclipse-mosquitto:2 -docker pull gitlab/gitlab-ce:16.4.1-ce.0 - -# Install markdownlint -sudo gem install mdl - -# Install madge for generating dependency graphs of typescript projects -sudo apt-get install graphviz -sudo npm install -g madge diff --git a/docs/admin/trial.md b/docs/admin/trial.md index 12a4adde0..4636a4014 100644 --- a/docs/admin/trial.md +++ b/docs/admin/trial.md @@ -31,7 +31,7 @@ You need the following information from the OAuth application registered on Gitl | OAuth Provider | REACT_APP_AUTH_AUTHORITY | https://gitlab.foo.com/ | | Application ID | REACT_APP_CLIENT_ID | | Callback URL | REACT_APP_REDIRECT_URI | https://foo.com/Library | -| Scopes | REACT_APP_GITLAB_SCOPES | openid profile read_user read_repository api | +| Scopes | REACT_APP_GITLAB_SCOPES | openid, profile, read_user, read_repository, api | ### Install diff --git a/servers/execution/runner/script/clean.bash b/servers/execution/runner/script/clean.bash index 14ec423c5..1d6cbdcea 100755 --- a/servers/execution/runner/script/clean.bash +++ b/servers/execution/runner/script/clean.bash @@ -1,2 +1,2 @@ #!/bin/bash -rm -rf build node_modules coverage dist *.svg \ No newline at end of file +rm -rf build node_modules coverage dist "*.svg" \ No newline at end of file diff --git a/servers/lib/script/clean.bash b/servers/lib/script/clean.bash index 43edac9e4..a11e0e0f6 100755 --- a/servers/lib/script/clean.bash +++ b/servers/lib/script/clean.bash @@ -1,2 +1,2 @@ #!/bin/bash -rm -rf build node_modules coverage dist *.svg \ No newline at end of file +rm -rf build node_modules coverage dist "*.svg" \ No newline at end of file