Data Portal Redux De Novo
...To be continued
-
Create an AWS account
-
Create a user group titled
docker-ecs-integration-group
and attachdocker-ecs-integration-policy
to the user group.
-
Download and install Docker Desktop. If you are working from a Mac, this should install
docker compose
as well, which is a cornerstone of the portal redux de novo. -
Update your daemon configuration file which should be located at
$HOME/.docker/daemon.json
. Make sure you have a DNS entry as shown below:
{
"builder": {
"gc": {
"defaultKeepStorage": "20GB",
"enabled": true
}
},
"dns": [
"172.20.0.3",
"8.8.8.8",
"8.8.4.4"
],
"experimental": false,
"features": {
"buildkit": true
}
}
This is necessary because the DNS inside the docker container was using a DNS server that wouldn't do the work of turning RDS endpoints into private ips, which is necessary in order for the PDO utility in PHP to connect to the database. This entry in the daemon file points Docker to Google's DNS servers to address this. AWS' use of private DNS servers on the Amazon VPC is described here.
- Make sure that the following two lines are added to your
/etc/hosts
file. To avoid setting our own DNS server, we add these entries which your machine will check first, before contacting its DNS server. Since local host will find a domain listing here, it won't contact a DNS server and we can browse the portal locally using a production domain.
127.0.0.1 viz.portal.cssat.org
127.0.0.1 portal.cssat.org
- Install
jq
for assistance in parsing json from the command line.
brew install jq
- Install
grep
for assistance in text parsing. Brew will installggrep
which will avoid conflicts with Mac OS X configurations present in the standardgrep
implemetnation.
brew install jq
-
Have an authorized member of the portal team create an IAM user account. This account should be added to the
docker-ecs-integration-group
user group and should be configured for programmatic access, such that the user is provided with an Access key ID and a Secret access key ID. -
Download the AWS CLI and follow the installation procedures for your personal machine.
-
Configure the AWS CLI by running
aws configure
from your local terminal. The Access key ID and Secret access key ID prompts should be filled with the values you were provided in step 1. The region and output fields should be set as shown in the following code chunk.
$ aws configure
AWS Access Key ID [None]: MyValueFromStep1
AWS Secret Access Key [None]: MyValueFromStep1
Default region name [None]: us-west-2
Default output format [None]: json
./ecr-push.sh browse 1.0.0-a.1
./ecr-push.sh viz 1.0.0-a.1