Skip to content

Instantly share code, notes, and snippets.

@christi3k
Created November 19, 2016 04:11
Show Gist options
  • Save christi3k/1f004e710643fc86e8f069f0fd988cac to your computer and use it in GitHub Desktop.
Save christi3k/1f004e710643fc86e8f069f0fd988cac to your computer and use it in GitHub Desktop.
#cloud-config
users:
- name: zulipdev
groups: sudo
shell: /bin/bash
sudo: ['ALL=(ALL) NOPASSWD:ALL']
ssh-authorized-keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtoDC+AAZeosQ1uPhWRUZ9PbfY/FBolq1PLr7Ezs1ERvdIUKzw1LWHMhZLV20URmoWC4O7P2fvrbksHE3uFsJ5SgOhq68V63ABE7PAgpOymxAjO8nKt5rYFtLWICzKCsE8WhrFK3Eu0ILbMgz6Vl0XeuluI3PUNppLiogyhk84mrKKemHn0pwrmIPwYeURiZvSS2UzCTA06mlkcTEKeGCMd5O5+5xmQGGqKsqoCzvb92RIYVREnv+fXbzG4fxu5i0zYYia/kH89HsFoo+zZmDgXV+NVDqixzK8Br79Y9/6O0ct6goQ9ySDDUOyII3/XmL0GnjbpqK/Pv1+49P6ERKv
package_update: true
packages:
- python
- virtualenv
runcmd:
- sed -i -e '/^PermitRootLogin/s/^.*$/PermitRootLogin no/' /etc/ssh/sshd_config
- sed -i -e '$aAllowUsers zulipdev' /etc/ssh/sshd_config
- restart ssh
- su -c 'git clone --origin upstream https://github.com/zulip/zulip.git /home/zulipdev/zulip' zulipdev
- sed -i "$ a export PS1=\'\\\w\$(__git_ps1 \" (%s)\")\$ \'" /home/zulipdev/.bashrc
power_state:
mode: reboot
condition: True
@christi3k
Copy link
Author

This gist is to create the base template VM. Once it's setup, ssh into it and run ./tools/provision.py within the zulip directory.

For use as a base template for other VMs, prior to running provision.py, you'll also want to create the file /etc/rabbitmq/rabbitmq-env.conf with the following contents:

# Defaults to rabbit. This can be useful if you want to run more than one node
# per machine - RABBITMQ_NODENAME should be unique per erlang-node-and-machine
# combination. See the clustering on a single machine guide for details:
# http://www.rabbitmq.com/clustering.html#single-machine
NODENAME=zulip@localhost

# By default RabbitMQ will bind to all interfaces, on IPv4 and IPv6 if
# available. Set this if you only want to bind to one network interface or#
# address family.
#NODE_IP_ADDRESS=127.0.0.1

# Defaults to 5672.
#NODE_PORT=5672

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment