Ops for Hubs by Mozilla
Перейти к файлу
John Shaughnessy 5e08b9eae4 Tag commits whose images land on stable channels 2022-11-29 16:26:15 -05:00
.github/workflows Tag commits whose images land on stable channels 2022-11-29 16:26:15 -05:00
ansible Add whats new token to reticulum ansible template 2022-02-12 14:21:51 -05:00
arbortect Drop DNS ttl to 5 min 2020-04-30 17:43:58 +00:00
bin updated elb rule priorities to leave /labs rules alone across deployments 2022-03-28 14:55:46 -04:00
check_dns Use empty string for name if there are no tags 2021-07-20 07:23:23 -07:00
cloudformation updated engine version for db 2022-09-09 14:24:08 -04:00
db Fix revocation of connect 2019-09-04 00:18:28 +00:00
jenkins Add necessary plumbling for reticulum cors proxying 2019-09-06 19:18:58 +00:00
manage_amis Remove unnecessary deps 2021-01-08 11:31:02 -08:00
packer Update bots nodejs version 9.x -> 16.x 2021-09-01 22:35:56 +02:00
plans Add plan for node 16.16.0 2022-08-02 18:26:53 -07:00
terraform allow udp dns egress 2022-01-10 20:45:44 -05:00
workers restrict worker response 2022-06-02 19:35:53 -04:00
.gitignore Add habitat development scripts. 2017-10-02 17:10:53 -07:00
CODE_OF_CONDUCT.md Add Mozilla Code of Conduct file 2019-03-29 23:42:16 -07:00
LICENSE Initial commit 2017-09-26 17:53:57 -07:00
README.md Fix typo in ssh config 2022-04-10 10:48:38 -04:00
helpers.sh Switch aws filters to json in helpers.sh 2020-05-06 18:59:00 -07:00

README.md

Hubs by Mozilla Ops

This repo contains all the necessary scripts and tools for standing up infrastructure for Hubs by Mozilla on AWS.

Contents:

ansible - Contains scripts for performing configuration deploys to the live Habitat ring, and other runbooks.

bin - Useful scripts for managing Hubs services

Expects ssh-agent to have mozilla mr ssh key registered and present in ~/.ssh/mozilla_mr_id_rsa.

host-types can be any ansible role such as: bots, discord, janus, migrate, postgrest, ret, and ssl. Or ci.

hostnames can be any server host name such as: quixotic-duck

environments include: prod and dev

See the top of each script for usage instructions.

helpers.sh - Functions for managing Hubs services.

Load in your .bashrc or .zshrc file by adding source ~/path/to/hubs-ops/helpers.sh

Expects an ssh config in ~/.ssh/config like the following:

Host *.reticulum.io
User ubuntu
PreferredAuthentications publickey,keyboard-interactive
IdentityFile ~/.ssh/mozilla_mr_id_rsa
ForwardAgent yes

See the helpers.sh source for more documenation on each command.

Useful commands include:

  • moz-ec2 [env] [asg] Lists active hosts from EC2, displaying environment, ASG, name, private IP, and public IP.
  • moz-ssh target ...cmd-args SSHes into the given target through its bastion host, e.g. moz-ssh dazzling-druid.
  • moz-admin Opens an SSH tunnel to the prod Postgrest admin console.
  • moz-admin-dev Opens an SSH tunnel to the dev Postgrest admin console.
  • moz-iex target ...cmd-args SSHes into a Reticulum host and opens an Elixir console.
  • moz-ci Creates a tunnel to the CI host's web interface on port 8088.
  • moz-scp env ...scp-args Proxies SCP over a bastion host, e.g. moz-scp prod dazzling-druid-local.reticulum.io:~/core core.

packer - Packer AMI definitions

plans - Habitat plans

terraform - Terraform + terragrunt scripts