Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Release 1.2 #380

Open
wants to merge 327 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
327 commits
Select commit Hold shift + click to select a range
cb71cc3
Do a better job of using the appropriate pip to install clousseau
Sep 6, 2019
74585c0
Remove debug statements
Sep 6, 2019
3e3f46d
Tagging R package installation to be skipped during travis tests
Sep 6, 2019
fd950cd
The log courrier role pulls from epel. Make sure it is available. Had…
Sep 9, 2019
5af68d3
Not running EOD desktop package install on dev/prod due to Samba3<>Sa…
Sep 10, 2019
10c97fe
Allow updating the configuration files when not upgrading
Sep 12, 2019
3b4c65d
Added execute mode back to R binary on research SAS to match prod. Wh…
Sep 20, 2019
d8b6e93
Need this to run before the r role
Sep 20, 2019
86dedaa
No longer setting R execute arguments due to lack of knowledge as to …
Sep 24, 2019
ca71681
Can now specify R dependencies and packages to skip/ignore
Sep 25, 2019
295746e
Fixed error; setting empty packages to ignore defaulting to a empty list
Sep 25, 2019
e07a7ff
Make sure nginx is off by default on analytics terminal
Sep 26, 2019
0ba097e
Defaulting pip ld env var to empty list instead of null due to usage …
Sep 26, 2019
88ba956
Remove deprecated commented command
Sep 27, 2019
90522b1
Adding umask to pip python package installs to make sure libraries ar…
Oct 4, 2019
aa45bf6
Updating rvm installer location
Oct 4, 2019
3b293bb
Allow for easy skip of pip upgrade
Oct 4, 2019
5274f9a
Merge pull request #372 from dvb-cfpb/rh-python36
tanderegg Oct 31, 2019
b7063e0
Remove annoying "need to have it" text on login
tanderegg Oct 21, 2019
831275d
Merge pull request #373 from tanderegg/stattransfer_fix
tanderegg Oct 31, 2019
6dcb9e5
addnig tmieout config and refactoring nightly monitor job
stirlingv Nov 7, 2019
f783e28
merging ansible.cnf
stirlingv Nov 7, 2019
51073df
Ansible fails on an empty vault file
Nov 12, 2019
01ad7e7
Apache runs by default, only enable explicitly
Nov 12, 2019
5973acd
Updated mesos agent restart handler to use a module instead of a comm…
Nov 14, 2019
66894e3
Updated known issues in README
Nov 15, 2019
3cc5300
Removing pentaho role. Was failing and no longer needed moving forward
Nov 18, 2019
f57f882
Added restriction to listen_addresses.
tanderegg Jun 6, 2018
484c81e
Simplify JDK settings and add wal_sizes
tanderegg Jun 12, 2018
0090d02
Added max_parallel_workers setting.
tanderegg Jun 11, 2018
b0bfa4f
Remove superflous brackets.
tanderegg Jun 12, 2018
50e5b6e
Simplify JDK settings and add wal_sizes
tanderegg Jun 12, 2018
ee4c0a2
Merge pull request #376 from tanderegg/citus_security
tanderegg Nov 22, 2019
217510a
Merge pull request #375 from dvb-cfpb/travis-fix--nginx-restart-fail
tanderegg Nov 22, 2019
b7939db
This blocks production settings, so must be removed.
tanderegg Nov 22, 2019
07f8981
Remove virtualenv, which is not a yum package
tanderegg Nov 22, 2019
1b8a635
Add condition to include
tanderegg Nov 23, 2019
03901f4
Merge pull request #374 from stirlingv/monitor_research
tanderegg Dec 9, 2019
d5259d8
Add handler to Citus as well for upgrade playbook
tanderegg Dec 9, 2019
bc501e0
Merge pull request #379 from cfpb/citus_upgrade
tanderegg Dec 11, 2019
d8693c7
adding stata16 deploy tasks and applying patch update
stirlingv Dec 27, 2019
9da6064
updating symlink paths
stirlingv Jan 2, 2020
ff939cc
removing extra -
stirlingv Jan 2, 2020
d27ed6f
Adding python36 to aurora proxy server (to be used for Avastus)
Jan 27, 2020
9aa2bf9
Merging defaults sections
Jan 28, 2020
a0c4ec8
Merge pull request #381 from stirlingv/stata16_deploy_and_patch
tanderegg Jan 28, 2020
f592bb5
Merge pull request #382 from dvb-cfpb/proxy-python36
tanderegg Jan 28, 2020
b31c6c0
Add default value for logstash_user
tanderegg Jan 30, 2020
a99ccbf
Merge pull request #383 from tanderegg/elasticsearch_fixes
tanderegg Feb 11, 2020
6b623b5
Merge pull request #385 from tanderegg/es_linelength
tanderegg Feb 11, 2020
830485b
WIP: Dw puppet fixes (#386)
tanderegg Feb 12, 2020
8716d81
WIP: Go agent rh7 (#378)
stirlingv Mar 9, 2020
1fd5bf7
Use new matlab_named_users variable instead of hard-coded list
Mar 30, 2020
445ebd3
Use new matlab_named_users variable instead of hard-coded list (#389)
gpacix Mar 31, 2020
3d9209c
Remove write permissions on mlm.opt; fix iteritems --> items;
Mar 31, 2020
e0b83d0
Minor fixes to matlab named-user license changes (#390)
gpacix Apr 1, 2020
3233bf9
Changes to allow easier deploy of new SQL scripts.
tanderegg Apr 6, 2020
1a4fc79
Adding pdfgrep code (#252)
hmaddahian Apr 16, 2020
2292cfb
Merge branch 'develop' of github.com:cfpb/aurora into develop
tanderegg Apr 16, 2020
4d52652
Fixes two typos.
tanderegg Feb 12, 2020
e9b0947
Adds identity mapping file to postgres-server.
tanderegg Feb 12, 2020
244e1c1
Removes default mappings.
tanderegg Feb 12, 2020
315c593
Adds postgres reload handler.
tanderegg Apr 14, 2020
2165279
Added additional change conditions and fixed warnings.
tanderegg Apr 6, 2020
569efd8
Added missing register attr
tanderegg Apr 6, 2020
da52c2f
Modified postgres handler to reload only unless overridden.
tanderegg Apr 14, 2020
61690f8
Added changed condition.
tanderegg Apr 14, 2020
5ee4bab
parent 61690f8d8b819fd05dab40f7473ee183fdfb1da3
tanderegg Apr 16, 2020
3c95c50
Fix changed logic.
tanderegg Apr 16, 2020
1d8863e
Fix changed typo.
tanderegg Apr 16, 2020
00db58a
Fixed type on os version check.
tanderegg Apr 16, 2020
3dcd8c6
Added documentation to pg_ident template.
tanderegg Apr 16, 2020
57aa9e2
Merge pull request #387 from tanderegg/citus_sso
tanderegg Apr 16, 2020
89ca348
Merge remote-tracking branch 'cfpb/develop' into develop
Apr 17, 2020
279252c
Trying to get things working: changed gluster package versions, comme…
Feb 4, 2018
441694f
Updating .gitignore
Feb 4, 2018
85580cc
More gluster skipping, sudo-un-disabling
Feb 4, 2020
197e4ec
Fix pp_xlogdir to not have a trailing slash; fix uses to not expect one
Feb 7, 2020
b660df3
Fixing loop-related deprecation warnings
Feb 8, 2020
3afea26
Fixing ansible_distribution_[major_]version checks to do string compa…
Feb 10, 2020
2a9f779
Fix problem where groups and hosts have the same names
Feb 10, 2020
2943b56
Hack service-related tasks so that they work on CentOS 7
Feb 12, 2020
ad9ad01
Skip /etc/hosts file tweaking if we're using Docker containers instea…
Feb 15, 2020
389e95e
Rename citus_coordinator_group back to citus_coordinator, rename the …
Feb 15, 2020
c52619e
Fix typo: syncronous_standby_names -> synchronous_standby_names throu…
Feb 15, 2020
3a4ac30
Fix warnings (items, loop var) and quote some values in postgresql-se…
Feb 15, 2020
dae9fb3
Skip 'Ensure the data directory exists' task in postgresql-server role
Feb 15, 2020
5227c9e
Fix how we interpret pp_install and pp_upgrade passed as --extra-vars
Feb 19, 2020
bbb7d69
Add forgotten group_vars file for citus_coordinator_standby
Feb 19, 2020
391fa67
Fix loop variable in posgresql-server-config role's create_functions.yml
Feb 19, 2020
627bec5
Temporarily increase timeouts until we can make a permanent fix (with…
Feb 19, 2020
db90581
Add archive-wal-file script, make Citus Coordinator (only) use it for…
Feb 27, 2020
286399d
Citus: generate keypair for postgres@coordinator, make postgres@stand…
Feb 28, 2020
1e2658f
deploy_citus.yml: give plays descriptive names
Mar 3, 2020
d77c740
Minor fixes to deploy_citus.yml: handle missing pp_install/pp_upgrade…
Mar 3, 2020
62572fe
Add plays to create SSH key for postgres@citus_coordinator and allow …
Mar 3, 2020
5e6491f
Fix citus_coordinator_standby group_vars to turn on pp_hot_standby, r…
Mar 3, 2020
3a6ec55
.gitignore: add pipcache and yumcache
Mar 3, 2020
37bea80
Add .devcontainer subdirectory for Docker mode
Mar 3, 2020
4a38d8f
.devcontainer templates: add volumes to containers to enable them to …
Mar 3, 2020
4893683
Add the WAL archiving script (template, task under citus_coordinator …
Mar 4, 2020
cb92210
Add to .gitignore: .devcontainer/docker-compose.yml
Mar 4, 2020
4c2a49a
Add comment for citus_coordinator key; fix coordinator hostname refer…
Mar 4, 2020
bfa7420
Add useful stuff to docker-in-docker container's bashrc
Mar 4, 2020
700e8af
Make streaming replication and log shipping work
Mar 9, 2020
50e1fab
Fix timestamp output in archive-wal-file script
Mar 11, 2020
d2f393e
Make sure /sbin/service is available before calling it
Mar 18, 2020
5be1d70
Add job names in Travis CI configuration
Mar 19, 2020
601f522
Revert change to location of go-agent RPM: use downlaod site
Mar 19, 2020
c48ab64
Temporarily comment out irrelevant jobs in the Travis build
Mar 19, 2020
38d0290
Really revert the change, so it downloads the RPM
Mar 19, 2020
d682c4d
Travis: add sequence number to each job in its leading comment
Mar 20, 2020
0bc1e61
Travis: temporarily comment out all jobs but 14; add find for debug
Mar 20, 2020
1e5e318
Re-enable all Travis jobs
Apr 2, 2020
aaf2614
Fix typo in .travis.yml file
Apr 2, 2020
2731e91
Reformat lists to make yum package lists more legible
Apr 17, 2020
53f40e6
Prevent FIPS error from failing playbook.
tanderegg Apr 16, 2020
f282b19
Merge pull request #392 from tanderegg/citus_sso
tanderegg Apr 20, 2020
fd4f85b
Add Citus job for Travis build; clean up some comments; renumber hosts
Apr 24, 2020
dc9ad72
Formatting only: ensure spaces inside {{ }} everywhere we changed
Apr 24, 2020
5ff381d
Fix distribution version comparison, add when clause, remove a DEBUG
Apr 24, 2020
ced6c46
Change default for skip_glusterfs back to false
Apr 24, 2020
fd9eead
Convert "sudo:" instances to "become:", restoring commented-out ones
Apr 24, 2020
89ac4b9
Make deploy_development_terminal playbook work: fix downloads, more
Apr 24, 2020
a47f650
Ensure /var/cache/downloads exists before using it
Apr 27, 2020
852e5ae
Make Travis build run on CentOS 7 instead of CentOS 6
Apr 27, 2020
8ac3765
Allow individual Travis jobs to use CentOS 7; no mod_authz_ldap in 7
Apr 28, 2020
048eb50
Temporary debug task to show ip6tables status, journalctl
Apr 28, 2020
dd5b414
Add retry logic to cpanminus download in sqitch role
Apr 28, 2020
5145699
Restrict Citus job (#22) to Coordinator; set groups correctly
Apr 28, 2020
0a429b2
Temporarily comment out Travis jobs: all but #10 and #22
Apr 28, 2020
890ac6a
Fix indentation problem for fetch-cpanminus task
Apr 28, 2020
af9ac9a
Change host file alteration so it also works under Docker
Apr 28, 2020
5436812
Create temp file for additional hosts, since it doesn't exist
Apr 28, 2020
407a32e
Temporarily comment out all Travis jobs except Citus Coordinator (#22)
Apr 29, 2020
3bd5ae6
Fix quoting in failed_when for task 'Update Citus extension'
Apr 29, 2020
498cca5
Fix the fix for the quoting
Apr 29, 2020
8a3b595
Check whether result.notices is defined before using it
Apr 29, 2020
9a1d563
Same check for undefined, but in deploy_citus_server.yml playbook
Apr 29, 2020
92d21a5
Add Citus shared preload library to Travis job extra_vars (#22)
Apr 29, 2020
594bfe2
Deal with case where there is no citus_coordinator_standby group
Apr 29, 2020
62f5f32
Fix syntax error with set_fact
Apr 29, 2020
54a9c56
Fix indentation error
Apr 29, 2020
793b2a8
Check for existence of citus_coordinator_standby group for hostkey
Apr 29, 2020
0f1fc2f
Clean up the install_pp/pp_install logic
Jun 4, 2020
d72cb74
Fix messed-up merge; add acl package in common
Jun 4, 2020
8f6d883
Further fix pp_datadir/pp_xlogdir situation
Jun 4, 2020
6608b17
Minimal flag for postgresql-server-config role, use for standby
Jun 4, 2020
a033b25
Remove (generated) archive-wal-file script from repo
Jun 8, 2020
9be10e4
Document pp_ssl_enable in postgresql-server defaults file
Jun 8, 2020
640893d
Document Kerberos/pg_ident.conf; add links in README to role READMEs
Jun 8, 2020
721e546
Merge remote-tracking branch 'cfpb/develop' into develop
Jul 22, 2020
9862a56
Merge branch 'develop' into citus-standby-replication
Jul 22, 2020
2ba1630
Trying to get things working: changed gluster package versions, comme…
Feb 4, 2018
dc2ccae
Updating .gitignore
Feb 4, 2018
59f0aac
More gluster skipping, sudo-un-disabling
Feb 4, 2020
f461125
Fix pp_xlogdir to not have a trailing slash; fix uses to not expect one
Feb 7, 2020
a5781d3
Fixing loop-related deprecation warnings
Feb 8, 2020
ed431d2
Fixing ansible_distribution_[major_]version checks to do string compa…
Feb 10, 2020
404f4b3
Fix problem where groups and hosts have the same names
Feb 10, 2020
2f38a2f
Hack service-related tasks so that they work on CentOS 7
Feb 12, 2020
93ece1c
Skip /etc/hosts file tweaking if we're using Docker containers instea…
Feb 15, 2020
5e3750c
Rename citus_coordinator_group back to citus_coordinator, rename the …
Feb 15, 2020
749020f
Fix typo: syncronous_standby_names -> synchronous_standby_names throu…
Feb 15, 2020
5bc78e8
Fix warnings (items, loop var) and quote some values in postgresql-se…
Feb 15, 2020
df67c67
Skip 'Ensure the data directory exists' task in postgresql-server role
Feb 15, 2020
7c0631d
Fix how we interpret pp_install and pp_upgrade passed as --extra-vars
Feb 19, 2020
2238210
Add forgotten group_vars file for citus_coordinator_standby
Feb 19, 2020
64be2c6
Fix loop variable in posgresql-server-config role's create_functions.yml
Feb 19, 2020
a54fe86
Add archive-wal-file script, make Citus Coordinator (only) use it for…
Feb 27, 2020
959d4b4
Citus: generate keypair for postgres@coordinator, make postgres@stand…
Feb 28, 2020
cbcf198
deploy_citus.yml: give plays descriptive names
Mar 3, 2020
a3281d3
Minor fixes to deploy_citus.yml: handle missing pp_install/pp_upgrade…
Mar 3, 2020
cef2824
Add plays to create SSH key for postgres@citus_coordinator and allow …
Mar 3, 2020
4437240
Fix citus_coordinator_standby group_vars to turn on pp_hot_standby, r…
Mar 3, 2020
dd84ac9
.gitignore: add pipcache and yumcache
Mar 3, 2020
5c74f1b
Add .devcontainer subdirectory for Docker mode
Mar 3, 2020
96ecaa5
.devcontainer templates: add volumes to containers to enable them to …
Mar 3, 2020
f290169
Add the WAL archiving script (template, task under citus_coordinator …
Mar 4, 2020
24cd0bc
Add to .gitignore: .devcontainer/docker-compose.yml
Mar 4, 2020
2968b72
Add comment for citus_coordinator key; fix coordinator hostname refer…
Mar 4, 2020
a28f165
Add useful stuff to docker-in-docker container's bashrc
Mar 4, 2020
efa4112
Make streaming replication and log shipping work
Mar 9, 2020
776cc25
Fix timestamp output in archive-wal-file script
Mar 11, 2020
7bd70d4
Make sure /sbin/service is available before calling it
Mar 18, 2020
e67c7a0
Add job names in Travis CI configuration
Mar 19, 2020
ac3af7b
Revert change to location of go-agent RPM: use downlaod site
Mar 19, 2020
97f4e0d
Temporarily comment out irrelevant jobs in the Travis build
Mar 19, 2020
a7dffe3
Really revert the change, so it downloads the RPM
Mar 19, 2020
b5c0b20
Travis: add sequence number to each job in its leading comment
Mar 20, 2020
eb50fbc
Travis: temporarily comment out all jobs but 14; add find for debug
Mar 20, 2020
2058e70
Re-enable all Travis jobs
Apr 2, 2020
1a94c8d
Fix typo in .travis.yml file
Apr 2, 2020
9136424
Reformat lists to make yum package lists more legible
Apr 17, 2020
ec9e644
Add Citus job for Travis build; clean up some comments; renumber hosts
Apr 24, 2020
93c1907
Formatting only: ensure spaces inside {{ }} everywhere we changed
Apr 24, 2020
0c9305c
Fix distribution version comparison, add when clause, remove a DEBUG
Apr 24, 2020
00cc1aa
Change default for skip_glusterfs back to false
Apr 24, 2020
5209b0a
Convert "sudo:" instances to "become:", restoring commented-out ones
Apr 24, 2020
aee58dd
Make deploy_development_terminal playbook work: fix downloads, more
Apr 24, 2020
b4f9821
Ensure /var/cache/downloads exists before using it
Apr 27, 2020
640e740
Make Travis build run on CentOS 7 instead of CentOS 6
Apr 27, 2020
d828508
Allow individual Travis jobs to use CentOS 7; no mod_authz_ldap in 7
Apr 28, 2020
b870e82
Temporary debug task to show ip6tables status, journalctl
Apr 28, 2020
e2c0f8a
Add retry logic to cpanminus download in sqitch role
Apr 28, 2020
80da77c
Restrict Citus job (#22) to Coordinator; set groups correctly
Apr 28, 2020
6afe77c
Temporarily comment out Travis jobs: all but #10 and #22
Apr 28, 2020
2df2050
Fix indentation problem for fetch-cpanminus task
Apr 28, 2020
4aa95d4
Change host file alteration so it also works under Docker
Apr 28, 2020
0e7cad6
Create temp file for additional hosts, since it doesn't exist
Apr 28, 2020
c813275
Temporarily comment out all Travis jobs except Citus Coordinator (#22)
Apr 29, 2020
00815a9
Fix quoting in failed_when for task 'Update Citus extension'
Apr 29, 2020
10bfb3b
Fix the fix for the quoting
Apr 29, 2020
87f17ca
Check whether result.notices is defined before using it
Apr 29, 2020
1d3b9d0
Same check for undefined, but in deploy_citus_server.yml playbook
Apr 29, 2020
4ab2c5a
Add Citus shared preload library to Travis job extra_vars (#22)
Apr 29, 2020
a020393
Deal with case where there is no citus_coordinator_standby group
Apr 29, 2020
79b10d1
Fix syntax error with set_fact
Apr 29, 2020
5848dde
Fix indentation error
Apr 29, 2020
ca22458
Check for existence of citus_coordinator_standby group for hostkey
Apr 29, 2020
6bd8888
Clean up the install_pp/pp_install logic
Jun 4, 2020
7294fec
Fix messed-up merge; add acl package in common
Jun 4, 2020
59a3faf
Further fix pp_datadir/pp_xlogdir situation
Jun 4, 2020
806c94c
Minimal flag for postgresql-server-config role, use for standby
Jun 4, 2020
9cbe530
Remove (generated) archive-wal-file script from repo
Jun 8, 2020
480acff
Document pp_ssl_enable in postgresql-server defaults file
Jun 8, 2020
9ef5dce
Document Kerberos/pg_ident.conf; add links in README to role READMEs
Jun 8, 2020
0c0eeb4
Rename "minimal" variable to "standby"
Jul 31, 2020
df4bdb0
Revert changes to WAL/xlogdir logic in deploy_citus_server.yml
Jul 31, 2020
201c631
Fix bug in citus_coordinator_standby where conf file not moved
Jul 31, 2020
f452ffe
Merge branch 'citus-standby-replication-latest' into citus-standby-re…
Jul 31, 2020
a779793
Added devtools7 and tesseract roles. Updated deploy_gocd to include t…
redspart Oct 5, 2020
2c30701
Minor changes from PR 388 review: restore .travis.yml, etc.
Oct 7, 2020
96f7e7a
Merge pull request #388 from gpacix/citus-standby-replication
tanderegg Oct 7, 2020
52a1ec4
Re enabled two roles
redspart Oct 13, 2020
d1e47c4
Re enabled common
redspart Oct 13, 2020
4253094
Added tessdata
redspart Oct 23, 2020
5a60b37
Merge remote-tracking branch 'upstream/develop' into develop
redspart Oct 26, 2020
78f002d
Fixed double autoconf install
redspart Oct 26, 2020
eb2dbaf
Added autoconf-archive backin
redspart Oct 26, 2020
b1ff6b7
Removed the creates on the unarchive to force a redownload
redspart Oct 28, 2020
c2821cd
Changed to only retrieve the english trained model
redspart Oct 29, 2020
023f2e6
Merge pull request #394 from redspart/develop
tanderegg Oct 30, 2020
b27e85d
Fix missing standby flags.
tanderegg Dec 11, 2020
7979396
psql_authnz should only be installed on the Coordinator
tanderegg Dec 11, 2020
f0df404
Update archive-wal-file.j2
tanderegg Dec 11, 2020
bf4f6fb
Adds archive cleanup command
tanderegg Dec 11, 2020
1a0b495
Update deploy_citus_server.yml
tanderegg Dec 11, 2020
b63d613
Hotfix
tanderegg Jun 15, 2021
03e01e4
Temporary hotfix
tanderegg Jun 15, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#-------------------------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------

# Note: You can use any Debian/Ubuntu based image you want.
FROM python:3.7

# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive

# Docker Compose version
ARG COMPOSE_VERSION=1.24.0

# The node image includes a non-root user with sudo access. Use the
# "remoteUser" property in devcontainer.json to use it. On Linux, update
# these values to ensure the container user's UID/GID matches your local values.
# See https://aka.ms/vscode-remote/containers/non-root-user for details.
ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID

# Configure apt and install packages
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils dialog 2>&1 \
#
# Verify git, process tools installed
&& apt-get -y install git iproute2 procps \
#
# Install Docker CE CLI
&& apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common lsb-release \
&& curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | (OUT=$(apt-key add - 2>&1) || echo $OUT) \
&& add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" \
&& apt-get update \
&& apt-get install -y docker-ce-cli \
#
# Install Docker Compose
&& curl -sSL "https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose \
&& chmod +x /usr/local/bin/docker-compose \
#
# Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user.
&& groupadd --gid $USER_GID $USERNAME \
&& useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \
# [Optional] Add sudo support for the non-root user
&& apt-get install -y sudo ansible fish vim sshpass make\
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME\
&& chmod 0440 /etc/sudoers.d/$USERNAME

RUN sed -i 's/#host_key_checking = False/host_key_checking = False/' /etc/ansible/ansible.cfg
# Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND=dialog
RUN echo source /workspace/.devcontainer/bashrc >>/usr/share/fish/config.fish
RUN ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
21 changes: 21 additions & 0 deletions .devcontainer/Dockerfile-base
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM centos/systemd

MAINTAINER "Hung Nguyen" <[email protected]>
#https://hub.docker.com/r/centos/systemd/dockerfile
RUN yum -y install sudo openssh-server openssh-clients initscripts; systemctl enable sshd.service

# Create user
RUN adduser super && \
usermod -a -G wheel super && \
echo "super:password" | chpasswd
RUN useradd -ms /bin/bash vagrant
RUN rm /usr/lib/tmpfiles.d/systemd-nologin.conf
RUN yum update -y


EXPOSE 22

CMD ["/usr/sbin/init"]

#docker run --privileged --name sshserver -v /sys/fs/cgroup:/sys/fs/cgroup:ro -d centos7-sshd
#docker build -f Dockerfile-base --rm --no-cache -t centos7-sshd .
15 changes: 15 additions & 0 deletions .devcontainer/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
this_container=$(shell docker ps --filter "name=${CONTAINERNAME}" -aq)
devcontainers=$(shell docker ps --filter "name=devcontainer" -aq | grep -v ${this_container})

buildbase:
cd ${PROJECT_ROOT}/.devcontainer && docker build -f Dockerfile-base --rm --no-cache -t centos7-sshd .
deploy:
ansible-playbook ${PROJECT_ROOT}/deploy/deploy_citus_server.yml -i ${PROJECT_ROOT}/deploy/vagrant_hosts \
--ask-pass --user=super --ask-sudo-pass

container:
@echo ${this_container}
rebuild:
docker rm -f $(devcontainers) $(this_container)
removeall:
docker rm -f $(devcontainers)
20 changes: 20 additions & 0 deletions .devcontainer/bashrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
export WORKSPACE=${WORKSPACE:-/workspace}
cat $WORKSPACE/.devcontainer/welcome.txt

alias deploy='ansible-playbook $WORKSPACE/deploy/deploy_nginx_proxy_server.yml -i $WORKSPACE/deploy/vagrant_hosts --ask-pass --user=super --ask-sudo-pass'
alias rbp='make -f $WORKSPACE/.devcontainer/Makefile rebuild'
alias rebuild='make -f $WORKSPACE/.devcontainer/Makefile rebuild'
alias inventory='cat $WORKSPACE'"/deploy/vagrant_hosts | grep ssh_host | sed 's/ ansible_ssh_host=/,/' | sed 's/ .*\$//'"
alias refreshcomposefile='$WORKSPACE/.devcontainer/scripts/rebuild-docker-compose.sh'
alias runansible='ansible-playbook --ask-pass --ask-sudo-pass --user=super -i $WORKSPACE/deploy/vagrant_hosts'

alias lf='ls -altr'
export PROMPT_COMMAND=
export VERBOSITY=-vv
export STANDBY=10.0.1.44
export PAGER=/bin/cat
pip3 install --upgrade ansible # if it wasn't; takes about 34 seconds

cd $WORKSPACE/deploy

export PS1='[\t \u@dind \W]\$ '
31 changes: 31 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// If you want to run as a non-root user in the container, see .devcontainer/docker-compose.yml.
{
"name": "Docker in Docker Compose",
"dockerComposeFile": "docker-compose.yml",
"service": "docker-in-docker",
"workspaceFolder": "/workspace",

// Use 'settings' to set *default* container specific settings.json values on container create.
// You can edit these settings after create using File > Preferences > Settings > Remote.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},

// Uncomment the next line if you want start specific services in your Docker Compose config.
// "runServices": [],

// Uncomment the next line if you want to keep your containers running after VS Code shuts down.
// "shutdownAction": "none",

// Uncomment the next line to run commands after the container is created.
// "postCreateCommand": "docker --version"

// Uncomment the next line to have VS Code connect as an existing non-root user in the container. See
// https://aka.ms/vscode-remote/containers/non-root for details on adding a non-root user if none exist.
// "remoteUser": "vscode",

// Add the IDs of extensions you want installed when the container is created in the array below.
"extensions": [
"ms-azuretools.vscode-docker"
]
}
45 changes: 45 additions & 0 deletions .devcontainer/docker-compose-base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#-------------------------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------

version: '3'
services:
docker-in-docker:
# Uncomment the next line to use a non-root user for all processes. You can also
# simply use the "remoteUser" property in devcontainer.json if you just want VS Code
# and its sub-processes (terminals, tasks, debugging) to execute as the user. On Linux,
# you may need to update USER_UID and USER_GID in .devcontainer/Dockerfile to match your
# user if not 1000. See https://aka.ms/vscode-remote/containers/non-root for details.
# user: vscode
environment:
CONTAINERNAME: docker-in-docker
build:
context: .
dockerfile: Dockerfile

volumes:
# Update this to wherever you want VS Code to mount the folder of your project
- ..:/workspace:cached

# Keep a pip cache on the host to save downloading time:
- ../.cache/pip:~/.cache/pip

# Forwards the local Docker socket to the container.
- /var/run/docker.sock:/var/run/docker.sock
- ./bashrc:/root/.bashrc
# make sure this file exists on your host machine else it will be created as a directory
- ~/.local/share/fish/docker_fish_history:/root/.local/share/fish/fish_history

# Uncomment the next four lines if you will use a ptrace-based debuggers like C++, Go, and Rust.
# cap_add:
# - SYS_PTRACE
# security_opt:
# - seccomp:unconfined

# Overrides default command so things don't shut down after the process ends.
command: sleep infinity
networks:
ansible_nw:
ipv4_address: 10.0.1.253

12 changes: 12 additions & 0 deletions .devcontainer/docker-compose-host-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#please note: the spacing needs to line up w/ the other yaml templates
HOSTNAME:
image: centos7-sshd:latest
restart: always
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- ../.cache/yum:/var/cache/yum:cached
networks:
ansible_nw:
ipv4_address: IPV4

5 changes: 5 additions & 0 deletions .devcontainer/docker-compose-networks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
networks:
ansible_nw:
ipam:
config:
- subnet: 10.0.1.0/24
118 changes: 118 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
#-------------------------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------

version: '3'
services:
docker-in-docker:
# Uncomment the next line to use a non-root user for all processes. You can also
# simply use the "remoteUser" property in devcontainer.json if you just want VS Code
# and its sub-processes (terminals, tasks, debugging) to execute as the user. On Linux,
# you may need to update USER_UID and USER_GID in .devcontainer/Dockerfile to match your
# user if not 1000. See https://aka.ms/vscode-remote/containers/non-root for details.
# user: vscode
environment:
CONTAINERNAME: docker-in-docker
build:
context: .
dockerfile: Dockerfile

volumes:
# Update this to wherever you want VS Code to mount the folder of your project
- ..:/workspace:cached

# Forwards the local Docker socket to the container.
- /var/run/docker.sock:/var/run/docker.sock
- ./bashrc:/root/.bashrc
# make sure this file exists on your host machine else it will be created as a directory
- ~/.local/share/fish/docker_fish_history:/root/.local/share/fish/fish_history

# Uncomment the next four lines if you will use a ptrace-based debuggers like C++, Go, and Rust.
# cap_add:
# - SYS_PTRACE
# security_opt:
# - seccomp:unconfined

# Overrides default command so things don't shut down after the process ends.
command: sleep infinity
networks:
ansible_nw:
ipv4_address: 10.0.1.253
#please note: the spacing needs to line up w/ the other yaml templates
citus_coordinator:
image: centos7-sshd:latest
restart: always
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- ../yumcache:/var/cache/yum:cached
networks:
ansible_nw:
ipv4_address: 10.0.1.40

#please note: the spacing needs to line up w/ the other yaml templates
citus_coordinator_standby:
image: centos7-sshd:latest
restart: always
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- ../yumcache:/var/cache/yum:cached
networks:
ansible_nw:
ipv4_address: 10.0.1.44

#please note: the spacing needs to line up w/ the other yaml templates
citus_worker_1:
image: centos7-sshd:latest
restart: always
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- ../yumcache:/var/cache/yum:cached
networks:
ansible_nw:
ipv4_address: 10.0.1.41

#please note: the spacing needs to line up w/ the other yaml templates
citus_worker_2:
image: centos7-sshd:latest
restart: always
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- ../yumcache:/var/cache/yum:cached
networks:
ansible_nw:
ipv4_address: 10.0.1.42

#please note: the spacing needs to line up w/ the other yaml templates
citus_worker_3:
image: centos7-sshd:latest
restart: always
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- ../yumcache:/var/cache/yum:cached
networks:
ansible_nw:
ipv4_address: 10.0.1.43

#please note: the spacing needs to line up w/ the other yaml templates
matlab:
image: centos7-sshd:latest
restart: always
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- ../yumcache:/var/cache/yum:cached
networks:
ansible_nw:
ipv4_address: 10.0.1.23

networks:
ansible_nw:
ipam:
config:
- subnet: 10.0.1.0/24
25 changes: 25 additions & 0 deletions .devcontainer/scripts/rebuild-docker-compose.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
export WORKSPACE=${WORKSPACE:-/workspace}

#inventory="$(cat $WORKSPACE/.devcontainer/scripts/tmp_inventory.csv | grep ssh_host | sed 's/ ansible_ssh_host=/,/' | sed 's/ .*$//')"
inventory="$(cat $WORKSPACE/.devcontainer/scripts/tmp_inventory.csv | grep -v '^#' | sed 's/ ansible_ssh_host=/,/' | sed 's/ .*$//')"
tmp_file="$WORKSPACE/.devcontainer/tmp_docker_compose.yml"

IFS=$'\n'
#echo $inventory
cat $WORKSPACE/.devcontainer/docker-compose-base.yml >$tmp_file
hosttemplate="$WORKSPACE/.devcontainer/docker-compose-host-template.yml"
networks="$WORKSPACE/.devcontainer/docker-compose-networks.yml"
while IFS= read -r line; do
echo "... $line ..."
IFS=', ' read -r -a array <<< "$line"

hostname="${array[0]}"
ipv4="${array[1]}"
#appending network to bottom
cat $hosttemplate | sed "s/HOSTNAME/$hostname/"|sed "s/IPV4/$ipv4/">>$tmp_file
done <<< "$inventory"

#appending network to bottom
cat $networks >>$tmp_file
cat $tmp_file >$WORKSPACE/.devcontainer/docker-compose.yml
27 changes: 27 additions & 0 deletions .devcontainer/welcome.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

Run alias:
inventory - to see all the inventory from vagrant_host
refreshcomposefile - will build docker-compose file w/ tmp_inventory
rebuild - drop all containers

Generate working CSV:
inventory > /workspace/.devcontainer/scripts/tmp_inventory.csv

OR Comment out the ones you don't want or filter with grep:
inventory | grep citus > /workspace/.devcontainer/scripts/tmp_inventory.csv
deploy:
ansible-playbook -i /workspace/deploy/vagrant_hosts --ask-pass --ask-sudo-pass --user=super path_to_playbook.yml

cat /workspace/.devcontainer/scripts/tmp_inventory.csv

Rebuild steps:
cd into .devcontainer-->make buildbase (only once)
Generate working CSV (see above)
refreshcomposefile
rebuild
wait 10 sec and click "RELOAD WINDOW"
runansible /path/to/play/book/playbook.yml

Fish is your friend!!!"
TYPE fish

8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,11 @@ local_settings.yml
#######################
local_settings.yml
system_key

*~
\#*
pipcache
yumcache

# This is a generated file, but the initial version is useful and should not change:
.devcontainer/docker-compose.yml
Loading