-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsimple.sh
More file actions
45 lines (36 loc) · 1.53 KB
/
simple.sh
File metadata and controls
45 lines (36 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env bash
INSTALL_DEPENDENCIES=false
DOWNLOAD_DIR=/tmp
if [ "$1" == "--install-deps" ] ; then
INSTALL_DEPENDENCIES=true
echo "Will install dependencies, will ask for super user priviledges"
fi
if [ "$INSTALL_DEPENDENCIES" = true ] ; then
echo "Updating apt"
sudo apt-get update
echo "Installing dependencies"
echo "Installing virtualbox..."
sudo apt install virtualbox
echo "Installing vagrant..."
wget -P $DOWNLOAD_DIR https://releases.hashicorp.com/vagrant/2.2.4/vagrant_2.2.4_x86_64.deb
sudo dpkg -i $DOWNLOAD_DIR/vagrant_2.2.4_x86_64.deb
sudo apt-get -f -y install
echo "Installing chefdk..."
wget -P $DOWNLOAD_DIR https://packages.chef.io/files/stable/chefdk/2.3.1/ubuntu/16.04/chefdk_2.3.1-1_amd64.deb
sudo dpkg -i $DOWNLOAD_DIR/chefdk_2.3.1-1_amd64.deb
sudo apt-get -f -y install
echo "Dependency installation completed successfully"
fi
echo "Getting the installer"
git clone https://github.com/logicalclocks/karamel-chef.git
echo "Creating VM"
cd karamel-chef
./run.sh ubuntu 1 hops
HOPSWORKS_PORT=$(./run.sh ports | grep "8181 ->" | awk '{print $3}')
echo "Removing installers"
rm $DOWNLOAD_DIR/vagrant_2.2.4_x86_64.deb
rm $DOWNLOAD_DIR/chefdk_2.3.1-1_amd64.deb
#rm $DOWNLOAD_DIR/virtualbox-6.0_6.0.8-130520~Ubuntu~bionic_amd64.deb
echo "VM Initialization started. Run \"tail -f karamel-chef/nohup.out\" to track progress."
echo "Once you see the success message, navigate to https://127.0.0.1:$HOPSWORKS_PORT/hopsworks"
echo "on your host machine with credentials user: admin@hopsworks.ai password: admin"