Skip to content
Snippets Groups Projects
Commit 164144b5 authored by Felipe D'Abrantes's avatar Felipe D'Abrantes
Browse files

Add more instructions to deployment steps document

parent 7c8c6bbe
No related branches found
No related tags found
1 merge request!32Google Cloud Deployment
## Artifact Registry
Our dockerised services have to be accessible from our Google Cloud project. To do this we use Google's (Artifact Registry)[https://cloud.google.com/artifact-registry] Service. This allows us to create a repository where we can store our own repository Docker images.
#### Creating the Repository
We first need to create the repository:
`gcloud artifacts repositories create daily-repo --repository-format=docker --location=europe-west2 --description="Docker repository"`
#### Service Account Permission
We now need to create a service account with read-only access to the repository we made. This is so that our container instances and other resources can pull images from it.
gcloud artifacts repositories add-iam-policy-binding daily-repo \
--location=europe-west2
--member=serviceAccount:438503002799-compute@developer.gserviceaccount.com
--role="roles/artifactregistry.reader"
## Pushing Docker Images
Now that we have our own repository, we can push our custom images we defined in our (docker-compose.yml)[docker-compose.yml] file.
- The **image** tag contains the repository to push the image to, as well as the name and tag of the image.
First, we need to configure the Docker command-line tool to authenticate with the Artifact Registry:
` gcloud auth configure-docker europe-west2-docker.pkg.dev`
We can now push the images to our repository:
`docker compose push`
After the command has finished, you should see all our images on (Google Cloud)[https://console.cloud.google.com/artifacts/docker/daily-384822/europe-west2/daily-repo?project=daily-384822].
<br />
## Kubernetes Cluster
Kubernetes is an _amazing_ open-source container orchestration system for automating software deployment, scaling, and management. We use it to manage our services!#
First, we need to create a cluster:
`gcloud container clusters create-auto daily-cluster --region=europe-west2`
Verify the cluster is connected:
`gcloud container clusters get-credentials daily-cluster --region europe-west2`
The output should be: _kubeconfig entry generated for daily-cluster_. If so, you are now connected to the cluster!
<br />
**We can now move on to deploying our images!!! :D**
<br />
## Mongo Volumes
### Storage Class
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment