From 09215a417dc3c86b3977ea9fe42b9f4dd2ff52b4 Mon Sep 17 00:00:00 2001 From: Brian Clark Date: Thu, 3 Dec 2020 13:00:13 -0500 Subject: [PATCH 1/6] Add staging api proxy to Ansible inventory --- ansible/inventory | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ansible/inventory b/ansible/inventory index 0237ec33b..424d05c3d 100644 --- a/ansible/inventory +++ b/ansible/inventory @@ -3,3 +3,6 @@ delphi-master-prod-01.delphi.cmu.edu [runtime_host_staging] app-mono-dev-01.delphi.cmu.edu + +[api_proxy_staging] +api-staging.delphi.cmu.edu From 5aac8af10cabf61c54644f7738fb30e2b55c0401 Mon Sep 17 00:00:00 2001 From: Brian Clark Date: Thu, 3 Dec 2020 13:17:53 -0500 Subject: [PATCH 2/6] Add new Ansible and template --- ansible/ansible-deploy-api-staging-matchlist.yaml | 13 +++++++++++++ ansible/templates/staging-api-match-list.j2 | 4 ++++ 2 files changed, 17 insertions(+) create mode 100644 ansible/ansible-deploy-api-staging-matchlist.yaml create mode 100644 ansible/templates/staging-api-match-list.j2 diff --git a/ansible/ansible-deploy-api-staging-matchlist.yaml b/ansible/ansible-deploy-api-staging-matchlist.yaml new file mode 100644 index 000000000..41c0493b9 --- /dev/null +++ b/ansible/ansible-deploy-api-staging-matchlist.yaml @@ -0,0 +1,13 @@ +--- +- hosts: api_proxy_staging + vars_files: + - vars.yaml + - vault.yaml + tasks: + - name: Set staging api proxy openresty signal match list template. + template: + src: templates/staging-api-match-list.j2 + dest: "/common/staging-api-match-list" + owner: "root" + group: "root" + mode: 0600 diff --git a/ansible/templates/staging-api-match-list.j2 b/ansible/templates/staging-api-match-list.j2 new file mode 100644 index 000000000..fecc32723 --- /dev/null +++ b/ansible/templates/staging-api-match-list.j2 @@ -0,0 +1,4 @@ +data_source=quidel-staging&signal=covid_ag_ +data_source=changehc +data_source=safegraph +data_source=google_symptoms \ No newline at end of file From ef74971ff9a7bc098e328534d5416500c9beac67 Mon Sep 17 00:00:00 2001 From: Brian Clark Date: Thu, 3 Dec 2020 13:41:49 -0500 Subject: [PATCH 3/6] Add step to Jenkinsfile, update file name --- Jenkinsfile | 1 + ...ist.yaml => ansible-deploy-staging-api-proxy-match-list.yaml} | 0 2 files changed, 1 insertion(+) rename ansible/{ansible-deploy-api-staging-matchlist.yaml => ansible-deploy-staging-api-proxy-match-list.yaml} (100%) diff --git a/Jenkinsfile b/Jenkinsfile index 0c9ac09ae..4cc0d3052 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -45,6 +45,7 @@ pipeline { } parallel deploy_staging } + sh "jenkins/ansible-deploy-staging-api-proxy-match-list" } } stage('Deploy production') { diff --git a/ansible/ansible-deploy-api-staging-matchlist.yaml b/ansible/ansible-deploy-staging-api-proxy-match-list.yaml similarity index 100% rename from ansible/ansible-deploy-api-staging-matchlist.yaml rename to ansible/ansible-deploy-staging-api-proxy-match-list.yaml From 787c28a51c276f3a5686264daebfd1df7e5f5f4e Mon Sep 17 00:00:00 2001 From: Brian Clark Date: Thu, 3 Dec 2020 13:53:38 -0500 Subject: [PATCH 4/6] Add specific remote user for this playbook --- ansible/ansible-deploy-staging-api-proxy-match-list.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible/ansible-deploy-staging-api-proxy-match-list.yaml b/ansible/ansible-deploy-staging-api-proxy-match-list.yaml index 41c0493b9..38698d56f 100644 --- a/ansible/ansible-deploy-staging-api-proxy-match-list.yaml +++ b/ansible/ansible-deploy-staging-api-proxy-match-list.yaml @@ -1,5 +1,6 @@ --- - hosts: api_proxy_staging + remote_user: deploy vars_files: - vars.yaml - vault.yaml From e01ac3675c322a742ad3d396cee2482502843503 Mon Sep 17 00:00:00 2001 From: Brian Clark Date: Thu, 3 Dec 2020 17:39:31 -0500 Subject: [PATCH 5/6] Update ansible/templates/staging-api-match-list.j2 Co-authored-by: Katie Mazaitis --- ansible/templates/staging-api-match-list.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/templates/staging-api-match-list.j2 b/ansible/templates/staging-api-match-list.j2 index fecc32723..ab0c4a1c8 100644 --- a/ansible/templates/staging-api-match-list.j2 +++ b/ansible/templates/staging-api-match-list.j2 @@ -1,4 +1,4 @@ data_source=quidel-staging&signal=covid_ag_ -data_source=changehc +data_source=chng data_source=safegraph -data_source=google_symptoms \ No newline at end of file +data_source=google_symptoms From 659e19ad08e8a6f362cb5586d568cf11b1b40765 Mon Sep 17 00:00:00 2001 From: Brian Clark Date: Thu, 3 Dec 2020 18:06:20 -0500 Subject: [PATCH 6/6] Update signal list --- ansible/templates/staging-api-match-list.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/templates/staging-api-match-list.j2 b/ansible/templates/staging-api-match-list.j2 index fecc32723..5938e59f9 100644 --- a/ansible/templates/staging-api-match-list.j2 +++ b/ansible/templates/staging-api-match-list.j2 @@ -1,4 +1,4 @@ data_source=quidel-staging&signal=covid_ag_ -data_source=changehc +data_source=chng data_source=safegraph -data_source=google_symptoms \ No newline at end of file +data_source=google-symptoms \ No newline at end of file