From fb2eb8459e568ae8dd06f532e82381e953864352 Mon Sep 17 00:00:00 2001 From: tei-k Date: Tue, 5 Jan 2021 11:20:42 +0900 Subject: [PATCH 1/3] Migrate to ghcr --- docs/BlueGreenDeploy.md | 16 ++++++++-------- modules/aws/scalardl/locals.tf | 4 ++-- modules/azure/scalardl/locals.tf | 4 ++-- .../universal/ca/provision/docker-compose.yml | 6 +++--- .../universal/cassy/provision/docker-compose.yml | 4 ++-- modules/universal/scalardl/vars.tf | 2 +- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/BlueGreenDeploy.md b/docs/BlueGreenDeploy.md index 13c9ec1ad..796cd709d 100644 --- a/docs/BlueGreenDeploy.md +++ b/docs/BlueGreenDeploy.md @@ -20,11 +20,11 @@ This module manages two Scalar DL clusters, blue and green. At any given time on scalardl = { blue_resource_count = "3" blue_image_tag = "2.0.1" - blue_image_name = "scalarlabs/scalar-ledger" + blue_image_name = "ghcr.io/scalar-labs/scalar-ledger" blue_discoverable_by_envoy = "true" green_resource_count = "0" green_image_tag = "2.0.1" - green_image_name = "scalarlabs/scalar-ledger" + green_image_name = "ghcr.io/scalar-labs/scalar-ledger" green_discoverable_by_envoy = "false" } ``` @@ -34,11 +34,11 @@ scalardl = { scalardl = { blue_resource_count = "3" blue_image_tag = "2.0.1" - blue_image_name = "scalarlabs/scalar-ledger" + blue_image_name = "ghcr.io/scalar-labs/scalar-ledger" blue_discoverable_by_envoy = "true" green_resource_count = "3" green_image_tag = "2.1.0" - green_image_name = "scalarlabs/scalar-ledger" + green_image_name = "ghcr.io/scalar-labs/scalar-ledger" green_discoverable_by_envoy = "true" # <- this is set to `true` } ``` @@ -49,11 +49,11 @@ This makes all the requests from Envoy will go to green eventually. scalardl = { blue_resource_count = "3" blue_image_tag = "2.0.1" - blue_image_name = "scalarlabs/scalar-ledger" + blue_image_name = "ghcr.io/scalar-labs/scalar-ledger" blue_discoverable_by_envoy = "false" # <- this is set to `false` green_resource_count = "3" green_image_tag = "2.1.0" - green_image_name = "scalarlabs/scalar-ledger" + green_image_name = "ghcr.io/scalar-labs/scalar-ledger" green_discoverable_by_envoy = "true" } ``` @@ -64,11 +64,11 @@ It should be done after making sure that requests from Envoy are not going to bl scalardl = { blue_resource_count = "0" # <- this is set to 0 blue_image_tag = "2.0.1" - blue_image_name = "scalarlabs/scalar-ledger" + blue_image_name = "ghcr.io/scalar-labs/scalar-ledger" blue_discoverable_by_envoy = "false" green_resource_count = "3" green_image_tag = "2.1.0" - green_image_name = "scalarlabs/scalar-ledger" + green_image_name = "ghcr.io/scalar-labs/scalar-ledger" green_discoverable_by_envoy = "true" } ``` diff --git a/modules/aws/scalardl/locals.tf b/modules/aws/scalardl/locals.tf index 6230fa164..39bc79cd0 100644 --- a/modules/aws/scalardl/locals.tf +++ b/modules/aws/scalardl/locals.tf @@ -24,11 +24,11 @@ locals { resource_root_volume_size = 64 blue_resource_count = 3 blue_image_tag = "2.1.0" - blue_image_name = "scalarlabs/scalar-ledger" + blue_image_name = "ghcr.io/scalar-labs/scalar-ledger" blue_discoverable_by_envoy = true green_resource_count = 0 green_image_tag = "2.1.0" - green_image_name = "scalarlabs/scalar-ledger" + green_image_name = "ghcr.io/scalar-labs/scalar-ledger" green_discoverable_by_envoy = false target_port = 50051 privileged_target_port = 50052 diff --git a/modules/azure/scalardl/locals.tf b/modules/azure/scalardl/locals.tf index e419f439d..c684b26ea 100644 --- a/modules/azure/scalardl/locals.tf +++ b/modules/azure/scalardl/locals.tf @@ -23,13 +23,13 @@ locals { resource_root_volume_size = 64 blue_resource_count = 3 blue_image_tag = "2.1.0" - blue_image_name = "scalarlabs/scalar-ledger" + blue_image_name = "ghcr.io/scalar-labs/scalar-ledger" blue_subnet_id = var.network.blue_subnet_id blue_discoverable_by_envoy = true blue_enable_accelerated_networking = false green_resource_count = 0 green_image_tag = "2.1.0" - green_image_name = "scalarlabs/scalar-ledger" + green_image_name = "ghcr.io/scalar-labs/scalar-ledger" green_subnet_id = var.network.green_subnet_id green_discoverable_by_envoy = false green_enable_accelerated_networking = false diff --git a/modules/universal/ca/provision/docker-compose.yml b/modules/universal/ca/provision/docker-compose.yml index 5fea944e1..b819c3c0f 100644 --- a/modules/universal/ca/provision/docker-compose.yml +++ b/modules/universal/ca/provision/docker-compose.yml @@ -10,13 +10,13 @@ services: # they start up at the same time (by commands like `docker-compose up`), # they both attempt to generate the same missing certificate files, which # results in a race condition. - image: scalarlabs/scalar-cfssl:1.0.0 + image: ghcr.io/scalar-labs/scalar-cfssl:1.0.0 volumes: - ca_data:/cfssl/data command: /bin/true cfssl-serve: - image: scalarlabs/scalar-cfssl:1.0.0 + image: ghcr.io/scalar-labs/scalar-cfssl:1.0.0 volumes: - ca_data:/cfssl/data depends_on: @@ -27,7 +27,7 @@ services: restart: always cfssl-ocspserve: - image: scalarlabs/scalar-cfssl:1.0.0 + image: ghcr.io/scalar-labs/scalar-cfssl:1.0.0 volumes: - ca_data:/cfssl/data depends_on: diff --git a/modules/universal/cassy/provision/docker-compose.yml b/modules/universal/cassy/provision/docker-compose.yml index b5cd845f4..52265402b 100644 --- a/modules/universal/cassy/provision/docker-compose.yml +++ b/modules/universal/cassy/provision/docker-compose.yml @@ -1,8 +1,8 @@ -version: '3.7' +version: "3.7" services: cassy: - image: scalarlabs/cassy:${IMAGE_TAG} + image: ghcr.io/scalar-labs/cassy:${IMAGE_TAG} ports: - "20051:20051" volumes: diff --git a/modules/universal/scalardl/vars.tf b/modules/universal/scalardl/vars.tf index b72d712e8..9c98b6abd 100644 --- a/modules/universal/scalardl/vars.tf +++ b/modules/universal/scalardl/vars.tf @@ -38,7 +38,7 @@ variable "scalardl_image_tag" { } variable "schema_loader_image" { - default = "scalarlabs/scalardl-schema-loader:1.3.0" + default = "ghcr.io/scalar-labs/scalardl-schema-loader:1.3.0" description = "The docker image for the schema loader" } From 2f785b1e1ae186eb052bf184a8519996c3807963 Mon Sep 17 00:00:00 2001 From: tei-k Date: Tue, 5 Jan 2021 15:48:27 +0900 Subject: [PATCH 2/3] Fix readme --- README.md | 4 ++-- docs/GettingStarted.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index aab883cf8..6e993396c 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Scalar Terraform is a set of terraform modules and provisioing scritps that can * [Terraform >= 0.12.x](https://www.terraform.io/downloads.html) * [Ansible >= 2.8.x](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) * Cloud provider CLI tools such as `aws` and `az` (they need to be configured with credentials) -* Docker Engine (with access to `scalarlabs/scalar-ledger` docker registry) +* Docker Engine (with access to `ghcr.io/scalar-labs/scalar-ledger` docker registry) * `scalar-ledger` is available to only our partners and customers at the moment. ## Getting Started @@ -26,7 +26,7 @@ The modules directory is where the terraform modules are located. The provider s #### [Provision](provision) The provision directory is where Ansible Playbooks are located. The Ansible Playbooks are designed to run on the most common Linux distributions. -## Contributing +## Contributing This repo is mainly maintained by the Scalar Engineering Team, but of course we appreciate any help. * For asking questions, finding answers and helping other users, please go to [stackoverflow](https://stackoverflow.com/) and use [scalardl](https://stackoverflow.com/questions/tagged/scalardl) tag. diff --git a/docs/GettingStarted.md b/docs/GettingStarted.md index 9a51f3c1f..ca3b12035 100644 --- a/docs/GettingStarted.md +++ b/docs/GettingStarted.md @@ -37,9 +37,9 @@ pip install --user ansible ### Docker * Docker install instructions can be found here: https://docs.docker.com/install/ -#### Post Install Steps (Make sure you connect to DockerHub) +#### Post Install Steps (Make sure you connect to GitHub Container Registry) ```console -docker login +docker login ghcr.io ``` ### AWS CLI (If using AWS) From 6cf73a73ce24c945331f142e2aa51618ea1e4c7f Mon Sep 17 00:00:00 2001 From: tei-k Date: Tue, 5 Jan 2021 17:26:24 +0900 Subject: [PATCH 3/3] Fix readme for docker login --- docs/GettingStarted.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/GettingStarted.md b/docs/GettingStarted.md index ca3b12035..cca796cae 100644 --- a/docs/GettingStarted.md +++ b/docs/GettingStarted.md @@ -39,7 +39,7 @@ pip install --user ansible #### Post Install Steps (Make sure you connect to GitHub Container Registry) ```console -docker login ghcr.io +echo $GITHUB_PAT | docker login ghcr.io -u $GITHUB_USER --password-stdin ``` ### AWS CLI (If using AWS)