Open Active Cloud shell
Create datalab env
datalab create <name> --zone <zone>sample:datalab create mydatalab --zone asia-east1-a
What service create in this time
Computing Service
Storage Service
Repository Service
Open DataLab
Develop on DataLab
Commit to GCP Repository
Open new could shell
SSH to Cloud Service (VM)
gcloud compute --project <project-id> ssh <user>@<instance> --zone zone <zoon>sample: gcloud compute --project qwiklabs-gcp-3b87b8785bf497ac ssh google5031275_student@mydatalab --zone asia-east1-asudo docker ps
# datalab是架在docker上docker exec -it 5685ff4ca32e bash
Check in GCP Repository again
Connect with Github
Open new could shell
SSH to Cloud Service (VM)
gcloud compute --project <project-id> ssh <user>@<instance> --zone zone <zoon>sample: gcloud compute --project qwiklabs-gcp-07c3064872c82b79 ssh google5032845_student@mydatalab --zone asia-east1-a
查看這台VM上面的Docker container ,可以發現一個用來Logging的Fluentd container,另一個是DataLab的container
sudo docker ps
連進DataLab的container
docker exec -it 96f364687a2d bash
由於避免搞壞原本的環境,所以這邊我們COPY一份Folder出來
cp /content/
cp -r datalab/ datalab2/
將原本的 .git folder 刪除
cd datalab2/notebooks
rm -rf .git
產生ssh key
ssh-keygen
將ssh public key 設定在 github 中
產生新的git設定
git init
git add .
git commit -m "<comment>"
git remote add origin <git_link>
git push -u origin master
到Github查看是否有成功