{"id":13752788,"url":"https://github.com/dominis/mikado","last_synced_at":"2025-05-09T20:34:23.254Z","repository":{"id":147782820,"uuid":"74707609","full_name":"dominis/mikado","owner":"dominis","description":"🤖💨Mikado helps managing your AWS infrastructure for WordPress sites by defining an out-of-box, highly available, easy-to-deploy setup","archived":true,"fork":false,"pushed_at":"2025-01-07T08:50:11.000Z","size":531,"stargazers_count":82,"open_issues_count":0,"forks_count":10,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-01-07T09:39:07.066Z","etag":null,"topics":["ansible","aws","aws-infrastructure","infrastructure","mikado","terraform","wordpress"],"latest_commit_sha":null,"homepage":"","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dominis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-24T22:01:11.000Z","updated_at":"2025-01-07T08:50:27.000Z","dependencies_parsed_at":"2025-01-07T09:32:30.620Z","dependency_job_id":"8b7baca5-1c0f-4a8b-a2a1-a0c0335a9ddb","html_url":"https://github.com/dominis/mikado","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominis%2Fmikado","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominis%2Fmikado/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominis%2Fmikado/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominis%2Fmikado/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dominis","download_url":"https://codeload.github.com/dominis/mikado/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253321759,"owners_count":21890461,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","aws","aws-infrastructure","infrastructure","mikado","terraform","wordpress"],"created_at":"2024-08-03T09:01:11.048Z","updated_at":"2025-05-09T20:34:23.225Z","avatar_url":"https://github.com/dominis.png","language":"Jinja","funding_links":[],"categories":["wordpress"],"sub_categories":[],"readme":"# Mikado\n\n\n## Intro\n\nMikado helps managing your AWS infrastructure for WordPress sites by defining an out-of-box, highly available, easy-to-deploy setup.\n\nThe project goals are:\n- Provide an oversimplified but flexible and resilient one-click WordPress deployment\n- Create a widely used standardized WordPress infrastructure\n- Implement performance, security and infrastructure best practices\n- Have automated, auditable, and idempotent configuration\n\n\n## Overview\n\nMikado provides a fully automated way to deploy and maintain your infrastructure built with [Terraform](https://terraform.io/) and [Packer](https://packer.io/) + [Ansible](https://www.ansible.com/) with the following services integrated optionally:\n\n- [Fastly](https://fastly.com/) - CDN\n- [Statuscake](https://statuscake.com/) - external monitoring\n- [Datadog](http://datadog.com/) - server monitoring \u0026 AWS resource monitoring\n- [Loggly](https://loggly.com/) - remote log collection\n- [Newrelic](https://newrelic.com/) - application monitoring\n\n## Infrastructure overview\n\n![Mikado overview](https://github.com/dominis/mikado/blob/master/resources/mikado-infra.png)\n\n- Mikado will create its own VPC with public and private subnets in all the available Availability Zones in the selected region - providing a geo-redundant highly-available setup\n- The WordPress site will be deployed to an Multi-AZ Auto scaling group with a set of pre-defined but fine tunable up/down scaling rules\n- Uploaded assets are stored on an EFS drive\n- A Multi-AZ RDS cluster is used in the database layer\n- Route53 used to manage DNS for the site\n- Optionally you can deploy a Fastly service for your site to cache all your requests.\n\n## Quick start\n\n```\ncurl -s https://raw.githubusercontent.com/dominis/mikado/master/scripts/mikado-boom \u003e /tmp/mikado-boom ; bash /tmp/mikado-boom\n```\n\nMikado provides a Vagrant instance for local development with all the dependencies installed.\n\nAlso a dialog based installer provided.\n\n![mikado](https://cloud.githubusercontent.com/assets/157738/21269257/54795560-c3b2-11e6-90d9-8432dcb38e01.gif)\n\n### Manual setup\n\nIf you don't want to use the installer or you want more control of what's happening you can run the following steps:\n\n```\ngit clone https://github.com/dominis/mikado.git\ncd mikado\n\n# create your configuration\ncp mikado.conf.example mikado.conf\nvi mikado.conf\n\n# now you can build the base infra\n# this will create a VPC with subnets, IAM roles, trusted SG, EFS storage for the uploads\n# more info in terraform/base*.tf\n# NB terraform always called through make because of the config\nmake apply\n\n\n# the next step is building your first AMI\n# this image will be used in the Auto Scaling Group\nmake build-ami\n\n# at this point you need to deploy this AMI to your production ASG\n# this step is only needed because you need an AMI id to be able to create the ASG\n# in the future you can create a new AMI and only deploy it to the test ASG\n# more info at: https://github.com/dominis/mikado#working-with-amis\nmake deploy-ami\n\n# go to the examples directory and find a config suitable for you\ncp examples/basic.tf terraform/mydomain.tf\nsed -i -e \"s|###DOMAIN###|mydomain.com|g\" terraform/mydomain.tf\n\nmake apply\n\n# Apply complete! Resources: 45 added, 0 changed, 0 destroyed.\n# 👏 🍾\n```\n\n\n\n### Deploying your website\n\nMikado has a very simple automated deploy workflow based on git and branches.\n\nYou need to set the `site_repo` variable in your `mikado.conf` file in the following format: `https://YOUR_GITHUB_OAUTH_TOKEN:x-oauth-basic@github.com/YOUR_GITHUB_USER/wordpress.example.com.git`\n\n[More info on the token creation](https://help.github.com/articles/creating-an-access-token-for-command-line-use/)\n\n\nTake a look at the [example repository](https://github.com/dominis/wordpress.example.com). The simplest way to start is forking this repo.\n\n#### Important information about the WordPress deploy process:\n\n- `develop` branch will be deployed to the test server\n- `production` branch will be deployed to the prod server\n- the `wp-contents/uploads` directory should be ignored in the `.gitignore` and shouldn't exists in the repo, a symlink is created pointing to the EFS mount here automatically\n- for the test/prod database config check out the [wp-config.php](https://github.com/dominis/wordpress.example.com/blob/develop/wp-config-sample.php#L32-L36)\n- [this is the script](https://github.com/dominis/mikado/blob/master/ansible/roles/wordpress/templates/deploy_wordpress.j2) which pulls the changes from git every minute on the instances\n\n### Working with AMIs\n\nWith `make build-ami` you can generate new AMIs and with running `make apply` the latest AMI will be rolled out to the `test` ASG.\n\nIf you happy with the result on your test site you can run `make deploy-ami` to tag the AMI as production ready and with `make apply` you can initiate a rolling update on your production ASG.\n\n## FAQ\n\n- Q: How can I ssh to my instances\n- A: Both the test and prod ELB exposes ssh for the IP blocks in the internal SG (TF_VAR_allowed_cidrs env var), so you can simply `ssh ec2-user@origin.domain.com` or `ssh ec2-user@test.domain.com`.\n\n\n- Q: The following error is thrown during `vagrant up`:\n    _The box 'bento/centos-7.1' could not be found or could not be accessed in the remote catalog. If this is a private box on HashiCorp's Atlas, please verify you're logged in via `vagrant login`. Also, please double-check the name. The expanded URL and error message are shown below:_ (sic!)\n- A: On version 1.8.7 the embedded curl Vagrant uses had a [bug](https://github.com/mitchellh/vagrant/issues/7969).\n    Workaround for v1.8.7: `sudo rm -rf /opt/vagrant/embedded/bin/curl`\n    Or, update Vagrant to v1.8.8\n\n## Mailing list\n\nhttps://groups.google.com/forum/#!forum/mikado-dev\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdominis%2Fmikado","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdominis%2Fmikado","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdominis%2Fmikado/lists"}