Giter VIP home page Giter VIP logo

hubs-ops's Introduction

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

hubs-ops's People

Contributors

brianpeiris avatar bryanenders avatar edunham avatar gfodor avatar infinitelee avatar johnshaughnessy avatar keianhzo avatar mozilla-github-standards avatar mqp avatar netpro2k avatar pattersonbl2 avatar robertlong avatar robinkwilson avatar tanfarming avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hubs-ops's Issues

Bot

Hi, I tried Mozilla hubs thanks to IEEEVR 2020 last week. I am amazed with the quality and want to start doing something using hubs. What I have in mind is a simple task: an avatar bot that comes with a menu to turn on/off a LED connected to a Rpi. I basically don't know where to start with hubs. Need some directions/suggestions here on where to start...

Stack creation was failed

Hi,
Hubs Cloud Personal deployment on AWS t3.medium was failed with rollback status as follow:

Resource handler returned message: "The runtime parameter of python2.7 is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (python3.9) while creating or updating functions. (Service: Lambda, Status Code: 400, Request ID: 621ae781-f305-41ad-bf0b-8de702413834, Extended Request ID: null)" (RequestToken: d7da230e-db6c-a5ed-d967-0bb779a5ddf4, HandlerErrorCode: InvalidRequest)

image

the version was 1.1.2 .
can you give me any idea to resolve this?
Cheers!

Potential AWS SAR vulnerability

Hi @gfodor
One of the terraform files needs an update, as it contains an AWS SAR security vulnerability that has been recently discovered. We wrote a detailed explanation on the vulnerability.

It is important to add a link to the source account that deploys to the bucket by adding an additional condition.

            Condition:
              StringEquals:
                "aws:SourceAccount":  <AWS::AccountId>

@gfodor I am tagging you as I have seen that you recently modified the file.

Helm Chart / Kubernetes Configs

To support deployment under other cloud services, we can provide a Helm chart (or alternative) for installation into Kubernetes clusters.

I plan to look into the existing infrastructure here and pull out what I can, but someone more familiar with the project could make progress more quickly.

Cloud Formation EC2 not created AWS Cloud Personal

Dears,

I created Hubs Cloud Personal from AWS Marketplace using Cloud Formation. It worked perfectly on my first AWS account, then I wanted to transfer the domain to another account, after that step I deleted the stack from the old AWS account and migrated the domain to the new hosted zones in the new AWS account.

Once all was ready, I re-did all the setup through Cloud Formation on the new AWS Account. After the setup had complete (successfully), I didn't see any EC2 instance(s) created.

Any suggestions?

Please advise if I am missing anything.

Incomplete Cloud Formation Template Mapping?

Beginning on line 3351 of stack.yaml:

ImageId: !FindInMap [Regions, !Ref "AWS::Region", ImageId]

However, the Mapping does not contain a Second level Key called ImageID:

Mappings: Regions: us-east-1: Abbreviation: USE1 us-west-1: Abbreviation: USW1 us-west-2: Abbreviation: USW2 us-east-2: Abbreviation: USE2 ap-northeast-1: Abbreviation: APN1 eu-west-1: Abbreviation: EU

It appears the AMI-ID is missing? My CFT Stack fails at line 3351.

Domains such as a.example.com cannot be used

I tried to create an AWS Hubs Cloud with a domain like "a.example.com" but it failed with an error message saying "Must be a valid domain name (eg myhub.com or hub.mycompany.com)".

Oddly enough, it succeeded for the domain "a..example.com".

I think this is due to a mistake in the AllowedPattern below. (The first \. is unnecessary)

AllowedPattern: ^((?:([a-z0-9]\.|[a-z0-9][a-z0-9\-]{0,61}[a-z0-9])\.)+)([a-z0-9]{2,63}|(?:[a-z0-9][a-z0-9\-]{0,61}[a-z0-9]))\.?$

Unable to disable 2FA through Cloud Formation

Hello, I'm the new admin for managing Hubs through an AWS Cloud Formation.
Unfortunately, I do not have access to the old admin's 2FA device.
How do I disable 2FA, or redeploy the stack so it uses 2FA with my device.
Would changing the key help?

Select SES region after selecting the template

Due to privacy restrictions, including GDPR, institutions are not able to rely on US based regions. Consequently being able to directly select an SES region or inherit the one used for servers.

CODE_OF_CONDUCT.md file missing

As of January 1 2019, Mozilla requires that all GitHub projects include this CODE_OF_CONDUCT.md file in the project root. The file has two parts:

  1. Required Text - All text under the headings Community Participation Guidelines and How to Report, are required, and should not be altered.
  2. Optional Text - The Project Specific Etiquette heading provides a space to speak more specifically about ways people can work effectively and inclusively together. Some examples of those can be found on the Firefox Debugger project, and Common Voice. (The optional part is commented out in the raw template file, and will not be visible until you modify and uncomment that part.)

If you have any questions about this file, or Code of Conduct policies and procedures, please see Mozilla-GitHub-Standards or email [email protected].

(Message COC001)

Upgrade to libnice stable release

Previously, we packaged a random git commit from libnice, because we really wanted bugfixes that were more recent than their stable release. However, nowadays, that's not the case -- libnice 0.1.15 or 0.1.16 should be quite satisfactory. We should upgrade when possible.

(I'm not just doing it right this instant because it will probably cause the usual cascading-dependencies-every-plan-needs-to-be-updated Habitat problems.)

Wiki changes

FYI: The following changes were made to this repository's wiki:

These were made as the result of a recent automated defacement of publically writeable wikis.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.