menu

Hosting a Web App on Google Cloud Using Compute Engine

실습으로 이동

1923 리뷰

avatar image

Low S. · 44분 전에 리뷰됨

avatar image

Syazaril Asyraf G. · 약 1시간 전에 리뷰됨

avatar image

Chenuka S. · 약 7시간 전에 리뷰됨

avatar image

Asiri H. · 약 10시간 전에 리뷰됨

avatar image

the lab is OK, although a bit long to execute I also have found out the following ways to simplify the lab, pls. feel free to consider them for the lab: cp ~/monolith-to-microservices/react-app/.env ~/monolith-to-microservices/react-app/.env.ORIG BACKEND_ADDRESS=$(gcloud compute instances describe backend --format='get(networkInterfaces[0].accessConfigs[0].natIP)') echo $BACKEND_ADDRESS sudo sed -i 's|localhost|'"$BACKEND_ADDRESS"'|' ~/monolith-to-microservices/react-app/.env more ~/monolith-to-microservices/react-app/.env FRONTEND_ADDRESS=$(gcloud compute instances describe frontend --format='get(networkInterfaces[0].accessConfigs[0].natIP)') echo $FRONTEND_ADDRESS watch -n 2 curl http://$FRONTEND_ADDRESS:8080 cp ~/monolith-to-microservices/react-app/.env.ORIG ~/monolith-to-microservices/react-app/.env LB_IP=$(gcloud compute forwarding-rules list --global | grep fancy-http-rule | awk '{print $2}') echo $LB_IP sudo sed -i 's|localhost|'"$LB_IP"'|' ~/monolith-to-microservices/react-app/.env more ~/monolith-to-microservices/react-app/.env and the startup-script.sh : cd ~/monolith-to-microservices cat << EOF2 > startup-script.sh #!/bin/bash # Install logging monitor. The monitor will automatically pick up logs sent to # syslog. curl -s "https://storage.googleapis.com/signals-agents/logging/google-fluentd-install.sh" | bash service google-fluentd restart & # Install dependencies from apt apt-get update apt-get install -yq ca-certificates git build-essential supervisor psmisc # Install nodejs mkdir /opt/nodejs curl https://nodejs.org/dist/v8.12.0/node-v8.12.0-linux-x64.tar.gz | tar xvzf - -C /opt/nodejs --strip-components=1 ln -s /opt/nodejs/bin/node /usr/bin/node ln -s /opt/nodejs/bin/npm /usr/bin/npm # Get the application source code from the Google Cloud Storage bucket. mkdir /fancy-store gsutil -m cp -r gs://fancy-store-$DEVSHELL_PROJECT_ID/monolith-to-microservices/microservices/* /fancy-store/ # Install app dependencies. cd /fancy-store/ npm install # Create a nodeapp user. The application will run as this user. useradd -m -d /home/nodeapp nodeapp chown -R nodeapp:nodeapp /opt/app # Configure supervisor to run the node app. cat >/etc/supervisor/conf.d/node-app.conf << EOF [program:nodeapp] directory=/fancy-store command=npm start autostart=true autorestart=true user=nodeapp environment=HOME="/home/nodeapp",USER="nodeapp",NODE_ENV="production" stdout_logfile=syslog stderr_logfile=syslog EOF supervisorctl reread supervisorctl update EOF2

Alexey S. · 약 12시간 전에 리뷰됨

avatar image

Manoj S. · 약 13시간 전에 리뷰됨

avatar image

Viknaraj M. · 약 13시간 전에 리뷰됨

avatar image

Anjar D. · 약 15시간 전에 리뷰됨

avatar image

Doolitha S. · 약 16시간 전에 리뷰됨

avatar image

Vinuri P. · 약 18시간 전에 리뷰됨

avatar image

Austin Goh -. · 약 18시간 전에 리뷰됨

avatar image

Ravindu B. · 약 20시간 전에 리뷰됨

avatar image

Amit K. · 약 21시간 전에 리뷰됨

avatar image

Wan Muhammad Syafiq W. · 약 23시간 전에 리뷰됨

avatar image

Tharindu R. · 약 24시간 전에 리뷰됨

avatar image

Muhammad N. · 1일 전에 리뷰됨

avatar image

The instructions is very clear

Mohamad Ariffin Z. · 1일 전에 리뷰됨

avatar image

Ayush P. · 1일 전에 리뷰됨

avatar image

Bhanuka R. · 1일 전에 리뷰됨

avatar image

too long

Chong Keat L. · 1일 전에 리뷰됨

avatar image

Too much content added into one lab. It makes hard to grasp things. Make shorter labs covering moderate amount of topics like the previous one of this quest.

Ashish K. · 1일 전에 리뷰됨

avatar image

nice

Shipra S. · 1일 전에 리뷰됨

avatar image

Isaac Y. · 2일 전에 리뷰됨

avatar image

HZ K. · 2일 전에 리뷰됨

avatar image

xue y. · 2일 전에 리뷰됨