{"push_id":780134481,"size":10,"distinct_size":2,"ref":"refs/heads/mysql_reset_slave","head":"99cabcdc5e90c51085c9a871e8e784aee6c28699","before":"087788450a369e4e2b0e5361177f390b96edac92","commits":[{"sha":"40e8afd19d82a8fb02cdd1d2848740ab86296d26","author":{"email":"16caafca5776de78039d6942c22728edb6dcf3fc@gmail.com","name":"Josh Myers"},"message":"Automate emergency publishing to frontend + static\n\nTo publish emergency content we need frontend + static\napplications checked out locally, make changes, commit,\nwait for CI to build, merge, deploy etc.\n\nIn the case of an emergency this is going to take too\nlong.\n\nThis task builds upon prior art to automate all of the\nsteps in the opsmanual (soon to be updated).\n\nSee opsmanual for more info on the available tasks.","distinct":false,"url":"https://api.github.com/repos/alphagov/fabric-scripts/commits/40e8afd19d82a8fb02cdd1d2848740ab86296d26"},{"sha":"87587e8c1a2ae6d833dd66c29e230a9f86e47da3","author":{"email":"16caafca5776de78039d6942c22728edb6dcf3fc@gmail.com","name":"Josh Myers"},"message":"We have a Fastly staging service, use it.\n\nSet environment variable which we can then use in\ntasks to do logic on a per environment basis.\n\nActually purge the correct CDN hostnames for\na given environment.","distinct":false,"url":"https://api.github.com/repos/alphagov/fabric-scripts/commits/87587e8c1a2ae6d833dd66c29e230a9f86e47da3"},{"sha":"1eee7e591ad91cde02204ff0bf649958a34ac614","author":{"email":"16caafca5776de78039d6942c22728edb6dcf3fc@gmail.com","name":"Josh Myers"},"message":"Cleanup CDN fab task.\n\nwww-gov-uk.map-fastly.net is no longer needed and\nhence setting a host header is also no longer\nneeded.","distinct":false,"url":"https://api.github.com/repos/alphagov/fabric-scripts/commits/1eee7e591ad91cde02204ff0bf649958a34ac614"},{"sha":"8528c5166ded2f8a0b34a60f782d7a0d4c0c70c4","author":{"email":"1fa2ef4755a9226cb9a0a4840bd89b158ac71391@mattbostock.com","name":"Matt Bostock"},"message":"Merge pull request #153 from alphagov/emergency_publishing\n\nEmergency publishing","distinct":false,"url":"https://api.github.com/repos/alphagov/fabric-scripts/commits/8528c5166ded2f8a0b34a60f782d7a0d4c0c70c4"},{"sha":"beafa1bb2d204bdbbebe934576e01d72dd938d42","author":{"email":"16caafca5776de78039d6942c22728edb6dcf3fc@gmail.com","name":"Josh Myers"},"message":"We have a Fastly staging service, use it.\n\nSet environment variable which we can then use in\ntasks to do logic on a per environment basis.\n\nActually purge the correct CDN hostnames for\na given environment.","distinct":false,"url":"https://api.github.com/repos/alphagov/fabric-scripts/commits/beafa1bb2d204bdbbebe934576e01d72dd938d42"},{"sha":"86d7adf077203d6e942c150f45c76c5d1443e69b","author":{"email":"1fa2ef4755a9226cb9a0a4840bd89b158ac71391@mattbostock.com","name":"Matt Bostock"},"message":"Merge pull request #152 from alphagov/fix_cdn_task\n\nFix cdn task","distinct":false,"url":"https://api.github.com/repos/alphagov/fabric-scripts/commits/86d7adf077203d6e942c150f45c76c5d1443e69b"},{"sha":"6df12433d2601856e752128bfde0117456bba9c1","author":{"email":"173e4baf7722781318c4f9ba6b90abd8874b8258@digital.cabinet-office.gov.uk","name":"Alex Muller"},"message":"Add a task to setup MySQL replication\n\nThis replaces a list of commands in the opsmanual with code:\nhttps://github.gds/pages/gds/opsmanual/infrastructure/howto/setup-mysql-replication.html\n\nI've used `run('sudo -i ...')` because `sudo()` doesn't appear to support\nsimulating a login shell.","distinct":false,"url":"https://api.github.com/repos/alphagov/fabric-scripts/commits/6df12433d2601856e752128bfde0117456bba9c1"},{"sha":"5cc21eee98652a9566a178a4d1c0bcafc24075a6","author":{"email":"e7ad189de60097591ca327b1a35c163aded9896b@users.noreply.github.com","name":"Andrew Langhorn"},"message":"Merge pull request #159 from alphagov/add-mysql-replication-setup-task\n\nAdd a task to setup MySQL replication","distinct":false,"url":"https://api.github.com/repos/alphagov/fabric-scripts/commits/5cc21eee98652a9566a178a4d1c0bcafc24075a6"},{"sha":"36cfdecc9bef8c6b028027975ef799a45477483f","author":{"email":"1fa2ef4755a9226cb9a0a4840bd89b158ac71391@mattbostock.com","name":"Matt Bostock"},"message":"Add a task to reset a MySQL slave\n\nAdd a task to reset a MySQL slave by running `RESET SLAVE;` and\nrepointing the replication log to the last known position.\n\nI found these steps very useful in recovering MySQL replication after\nthe VMs running master and slaves had been powered off in the new\nCarrenza Production environment and replication was failing when the VMs\nwere turned back on. Specifically, the error I saw was that the slave\nwas 'NULL' seconds behind the MySQL master.\n\nI've used `run()` in combination with `sudo -i` rather than `sudo()` so\nthat the `HOME` environment variable is set to `/root` so that\n`/root/my.cnf` is picked up by the MySQL client so that it does not\nprompt for a password.\n\nI've used `run('sudo -i...')` rather than `run_mysql_command()` when\nI've needed to grep for values.\n\nI tried using a pure SQL query to retrieve the replication status.\n`SELECT foo FROM information_schema.GLOBAL_STATUS;` didn't work because\nneither the `information_schema` or `mysql` databases store the values\nthis task uses. I also tried `SHOW STATUS LIKE 'Slave_Running'`, but\ncouldn't find a way (even using subqueries) to pull out just the value I\nneeded.","distinct":true,"url":"https://api.github.com/repos/alphagov/fabric-scripts/commits/36cfdecc9bef8c6b028027975ef799a45477483f"},{"sha":"99cabcdc5e90c51085c9a871e8e784aee6c28699","author":{"email":"1fa2ef4755a9226cb9a0a4840bd89b158ac71391@mattbostock.com","name":"Matt Bostock"},"message":"Use 'sudo -i' for consistency\n\nRather than using `sudo()` in combination with an environment variable,\nuse `sudo -i` for consistency with other Fabric tasks, which will ensure\nthat `$HOME` is set to the home directory for root.","distinct":true,"url":"https://api.github.com/repos/alphagov/fabric-scripts/commits/99cabcdc5e90c51085c9a871e8e784aee6c28699"}]}