Completed install docker section.
This commit is contained in:
@ -11,7 +11,7 @@
|
|||||||
# #+NAME: Create a new google cloud project
|
# #+NAME: Create a new google cloud project
|
||||||
|
|
||||||
# Create a project id based on date
|
# Create a project id based on date
|
||||||
export gcp_project_id="gitlab-gcp-"$(date +"%Y-%m-%d")
|
export gcp_project_id="gitlab-gcp-"$(date +"%s")
|
||||||
|
|
||||||
# Create new project using a random project id
|
# Create new project using a random project id
|
||||||
gcloud projects create $gcp_project_id
|
gcloud projects create $gcp_project_id
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
gcloud services enable compute.googleapis.com
|
gcloud services enable compute.googleapis.com
|
||||||
|
|
||||||
# Create name for virtual machine based on date
|
# Create name for virtual machine based on date
|
||||||
export gcp_machine_name="gitlab-gcp-"$(date +"%Y-%m-%d")
|
export gcp_machine_name="gitlab-gcp-"$(date +"%s")
|
||||||
|
|
||||||
# Create the new machine
|
# Create the new machine
|
||||||
gcloud compute instances create $gcp_machine_name --zone australia-southeast1-a
|
gcloud compute instances create $gcp_machine_name --zone australia-southeast1-a
|
||||||
|
|||||||
13
4-install-docker.sh
Executable file
13
4-install-docker.sh
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Step 3 - Install docker on virtual machine
|
||||||
|
|
||||||
|
# Next up we need to install [[https://docker.com][Docker]] on the newly created virtual machine so that we can then deploy Gitlab as a container.
|
||||||
|
|
||||||
|
# By default the virtual machine operating system for the vm we created on GCP is [[https://debian.org][Debian]]. There are instructions for installing Docker on a debian machine [[https://docs.docker.com/engine/install/debian/#install-using-the-repository][here]].
|
||||||
|
|
||||||
|
|
||||||
|
# Retrieve the vm name
|
||||||
|
export gcp_machine_name=$(gcloud compute instances list --limit=1 --format='value(name.basename())')
|
||||||
|
|
||||||
|
# Connect to the machine using ssh
|
||||||
|
gcloud compute ssh $gcp_machine_name --ssh-key-file ~/.ssh/$USER -- "curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh"
|
||||||
12
README.org
12
README.org
@ -89,8 +89,18 @@ gcloud compute instances create $gcp_machine_name --zone australia-southeast1-a
|
|||||||
|
|
||||||
* Step 3 - Install docker on virtual machine
|
* Step 3 - Install docker on virtual machine
|
||||||
|
|
||||||
Coming soon...
|
Next up we need to install [[https://docker.com][Docker]] on the newly created virtual machine so that we can then deploy Gitlab as a container.
|
||||||
|
|
||||||
|
By default the virtual machine operating system for the vm we created on GCP is [[https://debian.org][Debian]]. There are instructions for installing Docker on a debian machine [[https://docs.docker.com/engine/install/debian/#install-using-the-repository][here]].
|
||||||
|
|
||||||
|
#+begin_src bash :shebang #!/bin/bash :tangle 4-install-docker.sh
|
||||||
|
# Retrieve the vm name
|
||||||
|
export gcp_machine_name=$(gcloud compute instances list --limit=1 --format='value(name.basename())')
|
||||||
|
|
||||||
|
# Connect to the machine using ssh
|
||||||
|
gcloud compute ssh $gcp_machine_name --ssh-key-file ~/.ssh/$USER -- "curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh"
|
||||||
|
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* Step 4 - Install gitlab via docker
|
* Step 4 - Install gitlab via docker
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user