Skip to content

Instantly share code, notes, and snippets.

@svlasov
Last active June 28, 2017 15:07
Show Gist options
  • Save svlasov/4a250da7bd303403fa7e613884552bdb to your computer and use it in GitHub Desktop.
Save svlasov/4a250da7bd303403fa7e613884552bdb to your computer and use it in GitHub Desktop.
setup ubuntu 16.04 box
#!/usr/bin/env bash
CMD_USER=user
CMD_KEY=/root/.ssh/id_rsa.pub
GCP_PROJECT="cyberdam-154510"
GCP_ZONE="us-central1-c"
VS_DB_NAME=sd_cm_dev
VS_DB_HOST=172.18.0.10
VS_DB_PORT=27017
VS_MGR_API_HOST=110.128.0.11
VS_MGR_API_PORT="4500"
VS_MGR_GCLOUD_IMAGE="scanners-openvas-2017-06-20"
python /opt/secserv/vulscan/cloud/mgr.py \
-D $VS_DB_NAME -H $VS_DB_HOST -P $VS_DB_PORT \
-M $VS_MGR_API_HOST -p $VS_MGR_API_PORT -i $VS_MGR_GCLOUD_IMAGE \
-f $GCP_PROJECT -z $GCP_ZONE \
-U $CMD_USER -K $CMD_KEY > /var/log/secserv/vs-infra.log 2>&1 &
#!/usr/bin/env bash
#Install Docker
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-get install -y lsb-core
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt-get update
sudo apt-get install -y docker-ce
#!/usr/bin/env bash
sudo apt-get update && sudo apt-get install lsb-core
export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)"
echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
sudo apt-get update && sudo apt-get install -y google-cloud-sdk
#!/usr/bin/env bash
sudo apt-get install -y net-tools inetutils-ping python-pip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment