Giter Site home page Giter Site logo

awx-rpm's Introduction

AWX-RPM

Build Status

Fat RPMs for ansible-awx project.

Tested distributions:

  • Amazon linux 2017.3
  • Centos 7

How to build RPM

  • Grab source archive and put it in the repository root (see below how to do it)
  • Change version in awx.spec
  • Run your favorite rpm build process or use bundled scripts (build with docker): ./build.sh [amazonlinux-2017.03|centos-7]

How to build source archive

git clone [email protected]:ansible/awx.git
cd awx
git clone [email protected]:ansible/awx-logos.git

docker run -v `pwd`:/awx --rm -i centos:7 /bin/bash <<EOF
yum install -y epel-release && yum install -y bzip2 gcc-c++ git gettext make python-pip
curl --silent --location https://rpm.nodesource.com/setup_6.x | bash -
yum install -y nodejs
cd /awx/
make sdist
EOF

Installation

Install awx rpm package

yum install ./awx-XXX.x86_64.rpm

Install rabbitmq and postgresql96 server (example for centos7)

yum install -y epel-release
yum install -y https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm
yum install -y rabbitmq-server postgresql96-server
/usr/pgsql-9.6/bin/postgresql96-setup initdb
systemctl enable rabbitmq-server
systemctl start rabbitmq-server
systemctl enable postgresql-9.6
systemctl start postgresql-9.6

Create postgresql database and user for awx

sudo -u postgres createuser -S awx
sudo -u postgres createdb -O awx awx

Run sql migrations (takes a few minutes)

sudo -u awx /opt/awx/bin/awx-manage migrate

Initialize application

echo "from django.contrib.auth.models import User; User.objects.create_superuser('admin', 'root@localhost', 'password')" | sudo -u awx /opt/awx/bin/awx-manage shell
sudo -u awx /opt/awx/bin/awx-manage create_preload_data
sudo -u awx /opt/awx/bin/awx-manage provision_instance --hostname=$(hostname)
sudo -u awx /opt/awx/bin/awx-manage register_queue --queuename=tower --hostnames=$(hostname)

Configure nginx, use this example from awx repository

https://github.com/ansible/awx/blob/devel/installer/image_build/files/nginx.conf

Start and enable services (again, example for centos7)

systemctl start awx-cbreceiver
systemctl start awx-celery-beat
systemctl start awx-celery-worker
systemctl start awx-channels-worker
systemctl start awx-daphne
systemctl start awx-web

systemctl enable awx-cbreceiver
systemctl enable awx-celery-beat
systemctl enable awx-celery-worker
systemctl enable awx-channels-worker
systemctl enable awx-daphne
systemctl enable awx-web

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.