Last active
September 7, 2020 13:17
-
-
Save matsuu/6581b4fb279b8a4a38783ce1ff4652c2 to your computer and use it in GitHub Desktop.
user-data for isucon9q
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
password: isucon | |
chpasswd: | |
expire: False | |
ssh_pwauth: True | |
write_files: | |
- content: | | |
#!/bin/sh | |
set -e | |
export DEBIAN_FRONTEND=noninteractive | |
export HOME=/root | |
apt-get update | |
apt-get install -y --no-install-recommends ansible git | |
GITDIR="${HOME}/ansible-isucon9-qualify" | |
rm -rf ${GITDIR} | |
git clone https://github.com/matsuu/ansible-isucon9-qualify.git ${GITDIR} | |
( | |
cd ${GITDIR} | |
PYTHONUNBUFFERED=1 ANSIBLE_FORCE_COLOR=true ansible-playbook -i webapp, --connection=local standalone.yml | |
) | |
rm -rf ${GITDIR} | |
# for virtualbox | |
# https://bugs.launchpad.net/cloud-images/+bug/1573095 | |
sed -i -e "s/ console=ttyS0//" /etc/default/grub.d/50-cloudimg-settings.cfg | |
update-grub | |
owner: root:root | |
path: /var/lib/cloud/scripts/per-once/isucon.sh | |
permissions: '0755' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment