Skip to content

Commit 3db6e78

Browse files
JoLctejlecomte
andauthored
update(registry): terraform update with new registry for docker images (#81)
Co-authored-by: jlecomte <[email protected]>
1 parent e8c374d commit 3db6e78

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

mnq/sns-instances-notification-system/README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ This repository contains the source code for the this tutorial: [Creating a noti
44

55
## Requirements
66

7-
This example assumes that you are familiar with:
7+
To complete the actions presented below, you must have:
8+
9+
- A Scaleway account logged into the [console](https://console.scaleway.com)
10+
- [Set up authentication for the Terraform provider](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs#authentication)
11+
- An [SSH key](/identity-and-access-management/organizations-and-projects/how-to/create-ssh-key/)
12+
- [Set up the Scaleway CLI](/developer-tools/scaleway-cli/quickstart/)
813

9-
- how System Notification Service work. You can find out more in the [SNS Scaleway official documentation](https://www.scaleway.com/en/docs/serverless/messaging/quickstart/)
10-
- how Instances work. If needed, you can visit the [Instances Quickstart documentation](https://www.scaleway.com/en/docs/compute/instances/quickstart/).
11-
- how to create a SSH key. If not done already, you can follow the first 6 steps of [this walkthrough](https://www.scaleway.com/en/docs/identity-and-access-management/organizations-and-projects/how-to/create-ssh-key/#how-to-upload-the-public-ssh-key-to-the-scaleway-interface).
1214

1315
## Context
1416

@@ -25,6 +27,7 @@ export TF_VAR_public_ssh_key=$(cat ~/.ssh/id_ed25519.pub)
2527
Then you can run these commands:
2628

2729
```console
30+
cd terraform
2831
terraform init
2932
terraform plan
3033
terraform apply
@@ -38,4 +41,4 @@ terraform apply
3841
- Then connect to the publisher Instance with that URL ```http://<your_subscriber_ip_address>:8081```
3942
- Go to the home page of your publisher server: ```http://<your_publisher_ip_address>:8081```
4043
- Click on a CPU behavior, and check the notification page of your subscriber server. A notification about the behavior should have appeared.
41-
- Once you're done testing, you can apply `terraform destroy` to clean and remove the project.
44+
- Once you're done testing, you can apply `terraform destroy` to clean and remove the project.

mnq/sns-instances-notification-system/terraform/main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@ resource "scaleway_instance_server" "subscriber_sns_tuto_instance" {
9898
apt-get update && apt-get install -y docker.io
9999
systemctl start docker
100100
systemctl enable docker
101-
docker pull rg.fr-par.scw.cloud/sns-x-instance-tutorial/subscriber-server:1.0
101+
docker pull rg.fr-par.scw.cloud/mnq-tutorials/sns-instances-subscriber-server:1.0
102102
docker run -d --restart=always \
103103
--name subscriber-server \
104104
-p 8081:8081 \
105-
rg.fr-par.scw.cloud/sns-x-instance-tutorial/subscriber-server:1.0
105+
rg.fr-par.scw.cloud/mnq-tutorials/sns-instances-subscriber-server:1.0
106106
EOF
107107
}
108108
}
@@ -173,7 +173,7 @@ resource "scaleway_instance_server" "publisher_sns_tuto_instance" {
173173
- chmod +x /etc/profile.d/publisher-server_env.sh
174174
# Using 'source' command doesn't work in cloud-init runcmd because each command runs in a separate shell.
175175
# this is why environment variables will be passed directly in the docker run command
176-
- docker pull rg.fr-par.scw.cloud/sns-x-instance-tutorial/publisher-server:1.0
176+
- docker pull rg.fr-par.scw.cloud/mnq-tutorials/sns-instances-publisher-server:1.0
177177
- |
178178
. /etc/profile.d/publisher-server_env.sh
179179
docker run -d --restart=always \
@@ -182,7 +182,7 @@ resource "scaleway_instance_server" "publisher_sns_tuto_instance" {
182182
-e TOPIC_ARN=$TOPIC_ARN \
183183
-e AWS_ACCESS_KEY=$AWS_ACCESS_KEY \
184184
-e AWS_SECRET_KEY=$AWS_SECRET_KEY \
185-
rg.fr-par.scw.cloud/sns-x-instance-tutorial/publisher-server:1.0
185+
rg.fr-par.scw.cloud/mnq-tutorials/sns-instances-publisher-server:1.0
186186
EOF
187187
}
188188
}

0 commit comments

Comments
 (0)