├── .gitignore ├── CHANGES.md ├── README.md ├── scripts ├── setup-apt.sh ├── setup-backend.sh ├── setup-buildessential.sh ├── setup-circus.sh ├── setup-config.sh ├── setup-frontend.sh ├── setup-nginx.sh ├── setup-postgresql.sh ├── setup-python.sh ├── setup-rabbitmq.sh ├── setup-redis.sh └── setup-vars.sh ├── setup-devel.sh └── setup-server.sh /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaleidos-ventures/taiga-scripts/6cc8eaf120125a1873e5918f4ec72c105ba8c075/.gitignore -------------------------------------------------------------------------------- /CHANGES.md: -------------------------------------------------------------------------------- 1 | # Changelog # 2 | 3 | ## Version 0.2 ## 4 | 5 | Date: 2014-11-19 6 | 7 | - Add support to reprovisioning. 8 | - Use relative urls for simplify the initial installation. 9 | 10 | ## Version 0.1 ## 11 | 12 | Date: 2014-10-16 13 | 14 | - Initial version 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # [DEPRECATED] Taiga Bootstrap Scripts # 2 | 3 | [![Kaleidos Project](http://kaleidos.net/static/img/badge.png)](https://github.com/kaleidos "Kaleidos Project") 4 | [![Managed with Taiga.io](https://img.shields.io/badge/managed%20with-TAIGA.io-709f14.svg)](https://tree.taiga.io/project/taiga/ "Managed with Taiga.io") 5 | 6 | Scripts for initial deployment of Taiga services. 7 | 8 | It installs: 9 | 10 | - taiga-back version stable 11 | - taiga-front version stable 12 | 13 | **WARNING: these scripts are in an alpha state** 14 | 15 | ## Documentation ## 16 | 17 | http://taigaio.github.io/taiga-doc/dist/setup-alternatives.html#setup-taiga-scripts 18 | 19 | ## Community ## 20 | 21 | [Taiga has a mailing list](http://groups.google.com/d/forum/taigaio). Feel free to join it and ask any questions you may have. 22 | 23 | To subscribe for announcements of releases, important changes and so on, please follow [@taigaio](https://twitter.com/taigaio) on Twitter. 24 | -------------------------------------------------------------------------------- /scripts/setup-apt.sh: -------------------------------------------------------------------------------- 1 | function apt-install { 2 | for pkg in $@; do 3 | echo -e "[APT-GET] Installing package $pkg..." 4 | sudo apt-get install -yq $pkg 5 | done 6 | } 7 | 8 | 9 | function apt-install-if-needed { 10 | for pkg in $@; do 11 | if package-not-installed $pkg; then 12 | apt-install $pkg 13 | fi 14 | done 15 | } 16 | 17 | 18 | function package-not-installed { 19 | test -z "$(sudo dpkg -s $1 2> /dev/null | grep Status)" 20 | } 21 | 22 | sudo apt-get -y update 23 | sudo apt-get -y upgrade 24 | sudo apt-get -y dist-upgrade 25 | -------------------------------------------------------------------------------- /scripts/setup-backend.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | BACKEND_VERSION="stable" 4 | 5 | pushd ~ 6 | 7 | cat > /tmp/settings.py < /tmp/taiga-circus.ini < ~/.vimrc < ~/.tmux-conf.sh </dev/null) 36 | if \$(echo $state | grep -q "\$session"); then 37 | if \$(echo \$state | grep -qv "(attached)"); then 38 | tmux attach -t $session 39 | fi 40 | tmux select-window -t servers 41 | else 42 | tmux new-session -ds \$session -n servers 43 | tmux send-keys -t \$session 'taiga-runserver-back' C-m 44 | tmux attach -t \$session 45 | fi 46 | } 47 | 48 | function taiga-runserver-back { 49 | circusctl stop taiga 50 | workon taiga 51 | cd ~/taiga-back 52 | python manage.py runserver 127.0.0.1:8001 53 | } 54 | EOF 55 | 56 | cat > ~/.bash_profile < /tmp/conf.json < /tmp/taiga.conf < /dev/null 20 | sudo -u postgres createdb $USER &> /dev/null 21 | 22 | touch ~/.setup/postgresql 23 | fi 24 | 25 | -------------------------------------------------------------------------------- /scripts/setup-python.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | apt-install-if-needed python3 python3-pip python-dev python3-dev python-pip virtualenvwrapper libxml2-dev libxslt1-dev 4 | source /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh 5 | 6 | function mkvirtualenv-if-needed { 7 | for envname in $@; do 8 | $(lsvirtualenv | grep -q "$envname") || mkvirtualenv "$envname" -p /usr/bin/python3.5 9 | done 10 | } 11 | -------------------------------------------------------------------------------- /scripts/setup-rabbitmq.sh: -------------------------------------------------------------------------------- 1 | # rabbitmq.sh 2 | 3 | function rabbit-create-user-if-needed { 4 | username=$1 5 | password=$2 6 | $(sudo rabbitmqctl list_users | grep -q "$username") || sudo rabbitmqctl add_user $username $password 7 | } 8 | 9 | function rabbit-create-vhost-if-needed { 10 | vhost=$1 11 | $(sudo rabbitmqctl list_vhosts | grep -q "$vhost") || sudo rabbitmqctl add_vhost $vhost 12 | } 13 | 14 | function rabbit-set-permissions { 15 | username=$1 16 | vhost=$2 17 | configure=$3 18 | write=$4 19 | read=$5 20 | sudo rabbitmqctl set_permissions -p $vhost $username "$configure" "$write" "$read" 21 | } 22 | 23 | function rabbit-activate-plugin { 24 | plugin=$1 25 | if ! grep -q "$plugin" /etc/rabbitmq/enabled_plugins; then 26 | sudo rabbitmq-plugins enable "$plugin" 27 | sudo /etc/init.d/rabbitmq-server stop 28 | sudo rabbitmqctl stop 29 | sudo /etc/init.d/rabbitmq-server start 30 | fi 31 | } 32 | 33 | 34 | if [ ! -e ~/.setup/rabbitmq ]; then 35 | touch ~/.setup/rabbitmq 36 | 37 | apt-install-if-needed rabbitmq-server 38 | fi 39 | -------------------------------------------------------------------------------- /scripts/setup-redis.sh: -------------------------------------------------------------------------------- 1 | # redis.sh 2 | 3 | if [ ! -e ~/.setup/redis ]; then 4 | touch ~/.setup/redis 5 | 6 | apt-install-if-needed redis-server 7 | fi 8 | -------------------------------------------------------------------------------- /scripts/setup-vars.sh: -------------------------------------------------------------------------------- 1 | mkdir -p ~/.setup 2 | 3 | if [ -e ~/.setup/data.sh ]; then 4 | source ~/.setup/data.sh 5 | else 6 | echo -n "Scheme (default http): " 7 | read scheme 8 | echo -n "Hostname (default: localhost:8000): " 9 | read hostname 10 | 11 | if [ -z "$hostname" ]; then 12 | hostname="localhost:8000" 13 | fi 14 | 15 | if [ -z "$scheme" ]; then 16 | scheme="http" 17 | fi 18 | fi 19 | 20 | echo "Installing taigaio with user=$USER host=$hostname scheme=$scheme" 21 | sleep 2 22 | -------------------------------------------------------------------------------- /setup-devel.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | pushd ~ 5 | mkdir -p logs 6 | mkdir -p conf 7 | popd 8 | 9 | # Bootstrap 10 | # source ./scripts/setup-vars.sh 11 | source ./scripts/setup-config.sh 12 | source ./scripts/setup-apt.sh 13 | 14 | # Setup and install services dependencies 15 | source ./scripts/setup-postgresql.sh 16 | #source ./scripts/setup-redis.sh 17 | #source ./scripts/setup-rabbitmq.sh 18 | 19 | # Setup and install python related dependencies 20 | source ./scripts/setup-buildessential.sh 21 | source ./scripts/setup-python.sh 22 | 23 | # Setup Taiga 24 | source ./scripts/setup-frontend.sh 25 | source ./scripts/setup-backend.sh 26 | 27 | -------------------------------------------------------------------------------- /setup-server.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ $EUID -eq 0 ]]; then 4 | echo "taiga-scripts doesn't works properly if it used with root user." 1>&2 5 | exit 1 6 | fi 7 | 8 | source ./setup-devel.sh 9 | 10 | # Post Setup Services 11 | source ./scripts/setup-circus.sh 12 | source ./scripts/setup-nginx.sh 13 | --------------------------------------------------------------------------------