Files
upstream-zulip/tools/droplets/new-droplet-image
upstream-mirror 64898b2c79
Some checks failed
Code scanning / CodeQL (push) Failing after 15s
Zulip production suite / Ubuntu 22.04 production build (push) Failing after 26s
Zulip production suite / Debian 12 production install with custom db name and user (push) Has been skipped
Zulip production suite / Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga (push) Has been skipped
Zulip production suite / Ubuntu 24.04 production install (push) Has been skipped
Zulip production suite / Ubuntu 26.04 production install (push) Has been skipped
Zulip production suite / Debian 13 production install (push) Has been skipped
Zulip production suite / 7.0 Version Upgrade (push) Has been skipped
Zulip production suite / 8.0 Version Upgrade (push) Has been skipped
Zulip production suite / 6.0 Version Upgrade (push) Has been skipped
Zulip production suite / 10.0 Version Upgrade (push) Has been skipped
Zulip production suite / 9.0 Version Upgrade (push) Has been skipped
Zulip production suite / 12.0 Version Upgrade (push) Has been skipped
Zulip production suite / 11.0 Version Upgrade (push) Has been skipped
GitHub Actions Security Analysis with zizmor / zizmor (push) Failing after 3s
Zulip CI / Debian 12 (Python 3.11, backend + documentation) (push) Failing after 26s
Zulip CI / Ubuntu 22.04 (Python 3.10, backend + frontend) (push) Failing after 3s
Zulip CI / Ubuntu 24.04 (Python 3.12, backend) (push) Failing after 25s
Zulip CI / Ubuntu 26.04 (Python 3.14, backend) (push) Failing after 25s
Zulip CI / Debian 13 (Python 3.13, backend) (push) Failing after 28s
Zulip production suite / Required jobs (push) Has been cancelled
Zulip CI / Required jobs (push) Has been cancelled
API Documentation Update Check / check-feature-level-updated (push) Has been cancelled
API Documentation Update Check / notify-if-api-docs-changed (push) Has been cancelled
snapshot of https://github.com/zulip/zulip.git @ 48c69911c7dd4e03b20552eb3bd77ad8151c1357 (2026-09-15)
2026-09-15 15:05:30 +05:00

73 lines
1.9 KiB
Bash

#!/bin/bash
set -eux
if [[ $(id -u) -eq 0 ]]; then
# First pass through -- make the zulip user
# Add the zulipdev user, let it sudo
useradd -U -G sudo -m zulipdev -s /bin/bash
echo "zulipdev ALL=(ALL) NOPASSWD:ALL" >>/etc/sudoers.d/90-cloud-init-users
# Re-run as zulip for the remainder, which is below. We disable
# the shellcheck because we _do_ want to read $0 as root, as it's
# potentially not readable as zulipdev.
# shellcheck disable=SC2024
sudo -u zulipdev bash <"$0"
# Clear out the authorized_keys; this is filled in when the image
# is cloned.
true >~/.ssh/authorized_keys
# Clear history and reboot
true >~/.bash_history && history -c && rm "$0" && shutdown -h now
exit 0
fi
# This section is run as zulipdev
cd
# Set up an empty authorized_keys with the right permissions; this is
# filled in when the image is cloned.
mkdir -p .ssh
chmod 700 .ssh
true >.ssh/authorized_keys
chmod 600 .ssh/authorized_keys
(
# Set up Zulip
git clone https://github.com/zulip/zulip
cd zulip
git remote rename origin upstream
# Provision
./tools/provision
# Make sure the nodename in RabbitMQ is not host-dependent
sudo perl -pi -e 's/#?NODENAME=.*/NODENAME=zulip\@localhost/' /etc/rabbitmq/rabbitmq-env.conf
sudo service rabbitmq-server stop
sudo rm -rf /var/lib/rabbitmq/mnesia/
sudo service rabbitmq-server start
# Re-provision for the new rabbitmq nodename
./tools/provision
# Make sure it's clean
git clean -f
)
(
# Set up python-zulip-api
git clone https://github.com/zulip/python-zulip-api
cd python-zulip-api
git remote rename origin upstream
)
# rabbitmq-server's /var/lib/rabbitmq/.erlang.cookie is a secret, and
# should not be included in the base image
sudo service rabbitmq-server stop
sudo rm /var/lib/rabbitmq/.erlang.cookie
# Clear our history
true >~/.bash_history && history -c && exit