Ops for Hubs by Mozilla
Перейти к файлу
Brandon Patterson 54e282b5eb
Merge pull request #202 from mozilla/hotfix/s3_buckets
Set template to reflect version that will be published in version 1.1.6.
2023-05-04 15:40:03 -04:00
.github/workflows Update turkeyGitops.yml 2023-03-30 22:12:50 -04: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 Set template to reflect version that will be published in version 1.1.6. 2023-05-04 12:46:27 -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 cleanup (#194) 2023-03-03 00:51:18 -05: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