-
-
Notifications
You must be signed in to change notification settings - Fork 326
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: prepare Realtime for Marketplaces (#49)
* chore: update Packer & Ansible files Update Packer & Ansible settings to prepare for AWS/DO Marketplaces * chore: set aws.json's `source_ami` to be user var `source_ami`'s default is set to x64 Ubuntu 18.04 EBS HVM in ap-southeast-1 (Singpore), but ami codes change between regions, so this should be a user variable along with `region`. * fix: get SECRET_KEY_BASE from env * chore: proper cleanup of Ansible tmp files * docs: better error messages for SECRET_KEY_BASE * ci: fix artifact naming of release assets
- Loading branch information
Showing
17 changed files
with
860 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
APT::Periodic::Update-Package-Lists "1"; | ||
APT::Periodic::Download-Upgradeable-Packages "1"; | ||
APT::Periodic::AutocleanInterval "7"; | ||
APT::Periodic::Unattended-Upgrade "1"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
HOSTNAME=0.0.0.0 | ||
PORT=4000 | ||
DB_USER=postgres | ||
DB_HOST=localhost | ||
DB_HOST= | ||
DB_PORT=5432 | ||
DB_NAME=postgres | ||
DB_PASSWORD=postgres | ||
SECRET_KEY_BASE=SOMETHING_SUPER_SECRET | ||
DB_PASSWORD= | ||
SECRET_KEY_BASE= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,40 @@ | ||
{ | ||
"variables": { | ||
"aws_access_key": "{{env `AWS_ACCESS_KEY`}}", | ||
"aws_secret_key": "{{env `AWS_SECRET_KEY`}}" | ||
"aws_secret_key": "{{env `AWS_SECRET_KEY`}}", | ||
"region": "ap-southeast-1", | ||
"source_ami": "ami-0e763a959ec839f5e", | ||
"instance_type": "t2.micro" | ||
}, | ||
"builders": [ | ||
{ | ||
"type": "amazon-ebs", | ||
"access_key": "{{user `aws_access_key`}}", | ||
"secret_key": "{{user `aws_secret_key`}}", | ||
"region": "ap-southeast-1", | ||
"source_ami_filter": { | ||
"filters": { | ||
"virtualization-type": "hvm", | ||
"name": "ubuntu/images/*ubuntu-bionic-18.04-amd64-server-*", | ||
"root-device-type": "ebs" | ||
}, | ||
"owners": ["099720109477"], | ||
"most_recent": true | ||
}, | ||
"instance_type": "t2.micro", | ||
"region": "{{user `region`}}", | ||
"source_ami": "{{user `source_ami`}}", | ||
"instance_type": "{{user `instance_type`}}", | ||
"ssh_username": "ubuntu", | ||
"ami_name": "supabase-realtime-0.7.4" | ||
} | ||
], | ||
"provisioners": [ | ||
{ | ||
"type": "ansible", | ||
"playbook_file": "ansible/playbook.yml" | ||
"playbook_file": "ansible/playbook.yml", | ||
"ansible_env_vars": ["ANSIBLE_SSH_ARGS='-o IdentitiesOnly=yes'"], | ||
"user": "ubuntu" | ||
}, | ||
{ | ||
"execute_command": "echo 'packer' | sudo -S sh -c '{{ .Vars }} {{ .Path }}'", | ||
"type": "shell", | ||
"scripts": [ | ||
"scripts/01-test", | ||
"scripts/02-credentials_cleanup.sh", | ||
"scripts/90-cleanup.sh", | ||
"scripts/91-log_cleanup.sh", | ||
"scripts/99-img_check.sh" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
# | ||
# Scripts in this directory are run during the build process. | ||
# each script will be uploaded to /tmp on your build droplet, | ||
# given execute permissions and run. The cleanup process will | ||
# remove the scripts from your build system after they have run | ||
# if you use the build_image task. | ||
# | ||
echo "Commencing Digital Ocean Checks" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sudo rm /home/ubuntu/.ssh/authorized_keys |
Oops, something went wrong.