The bootstrap.sh
script uses a local salt install to bootstrap an AWS
VPC environment with a Salt Prime EC instance (minimum infrastructure on
which all future SaltStack management development can take place).
-
Install SaltStack:
brew install salt
-
Install boto and boto3 within SaltStack install:
/usr/local/Cellar/salt/2018.3.2/libexec/bin/pip install boto boto3
-
Configure AWS CLI with named profile of
creativecommons
-
Determine Availability Zones:
aws ec2 describe-availability-zones --region us-east-2 --profile creativecommons
-
Verify Parameters at top of
core.sls
-
Create VPC and related resources:
LOG_LEVEL=info TEST=True ./bootstrap.sh
- Use
TEST=False
after verifying run to effect changes - Expected/ignorable warning:
[WARNING ] /usr/local/Cellar/salt/2018.3.2/libexec/lib/python2.7/site-packages/salt/modules/boto_vpc.py:2487: DeprecationWarning: The 'describe_route_table' method has been deprecated and replaced by 'describe_route_tables'.
- Use
A few manual steps are necessary to prepare the salt-prime server.
- Verify
/dev/nvme1n1
is formatted and mounted on/srv
. Be careful not to overwrite data:sudo mkfs.ext4 -L salt-prime-srv /dev/nvme1n1
sudo mount -av
sudo mount
cd /srv
git clone [email protected]:creativecommons/sre-salt-prime.git base
sudo base/bin/repair_srv_permissions.sh
cd /srv/base
git remote set-url --push origin '###-COMMIT/PUSH-DISABLED-###'
ln -s ../../bin/git_hooks_pre-commit .git/hooks/pre-commit