Created
September 1, 2018 17:15
-
-
Save dipta007/90d42b34053782227d87fed0d377395c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gcloud compute --project "backpack-external" instances create "backpack1" \ | |
--zone "us-east1-b" \ | |
--boot-disk-auto-delete \ | |
--machine-type "n1-standard-2" \ | |
--metadata startup-script=" | |
\ | |
#!/bin/bash | |
sudo shutdown -P +10 | |
sudo rm -r amazon-scrapper-1M-nodejs/ | |
sudo apt-get update && sudo apt-get install -yq --no-install-recommends libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 libnss3 && curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - && Y | sudo apt-get install -y nodejs && Y | sudo apt-get install -y build-essential && git clone https://github.com/dipta007/amazon-scrapper-1M-nodejs && cd amazon-scrapper-1M-nodejs && npm install && sudo npm install pm2 -g && sudo pm2 start index.js | |
sleep 10 | |
curl localhost:8081/refresh/1230/3100 | |
\ | |
" \ | |
--subnet "default" --maintenance-policy "MIGRATE" \ | |
--tags "http-server","https-server" \ | |
--image "https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-1604-xenial-v20180831" \ | |
--boot-disk-size "10" --boot-disk-type "pd-standard" \ | |
--boot-disk-device-name "backpack1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment