Giter VIP home page Giter VIP logo

cyclosible's Introduction

Cyclosible

Build Status Coverage Status Stories in Ready

Cyclosible is a project backed by Cycloid in order to manage Ansible with a REST API.

The goal of Cyclosible is to be a lightweight application opensourced as a free alternative to Ansible Tower.

Cyclosible is used internally at Cycloid to let our customers use their own CI and interact with our deployment stack.

Technologies used

Cyclosible is built upon these technologies:

Prerequisite

Install REDIS

To start with Cyclosible, you will need to install redis. For this we suggest to create a redis docker container

Create Virtual Environment

First, install virtualenv:

sudo pip install virtualenv
sudo pip install virtualenvwrapper

Then, create the virtualenv:

mkvirtualenv cyclosible27 --no-site-packages -p /usr/bin/python2.7

I suggest here to install python 2.7 as ansible does not support python 3 yet.

Now, to work in your virtual environment, you can enable it with:

workon cyclosible27

Install required packages

You will need to clone this repository. Then you will be able to install the requirements:

pip install -r requirements.txt

Configure the S3 bucket

Actually the S3 bucket is mandatory. In the future we will try to make it optional or provide a plugin system to write your own storage.

You will need to activate the Website Hosting on your S3 bucket, and apply this permission (where cycloid-cyclosible is the name of your bucket):

{
  "Version":"2012-10-17",
  "Statement":[{
    "Sid":"PublicReadGetObject",
        "Effect":"Allow",
      "Principal": "*",
      "Action":["s3:GetObject"],
      "Resource":["arn:aws:s3:::cycloid-cyclosible/*"
      ]
    }
  ]
}

Configure the application

For this step, you will have to edit the cyclosible/Cyclosible/settings.py file, and configure these parameters:

  • BROKER_URL = 'redis://localhost:6379/0'
  • CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
  • CELERY_TIMEZONE = 'Europe/Paris'
  • SECRET_KEY = 'random string'
  • PLAYBOOK_PATH = "/home/ansible_playbook_path/"
  • S3_BUCKET = "cycloid-cyclosible"
  • S3_ACCESS_KEY = "XXXXXXXXXXX"
  • S3_SECRET_KEY = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

Before starting the application, we need to create the database. You can also configure the DATABASE settings, by default it will create a SQLite3 database. Please refer to the django website (link is above this parameter) to configure it correctly.

Then, apply the schema:

<cyclosible_path>/manage.py migrate

It will populate the database. Then you need to create a superuser:

<cyclosible_path>/manage.py createsuperuser

Start the application

The best way to run the application on production is to use supervisord.

There are 3 applications to start :

  • This one will start the webserver (DEV mode):
<cyclosible_path>/manage.py runserver
  • This one will start the worker which will run the playbook:
<cyclosible_path>/manage.py celery worker
  • This one will check if there are some tasks ton run on crontabs (actually optional):
<cyclosible_path>/manage.py celery beat

Now you should be able to connect on the admin interface: http://<yourip>:8000/admin/

Development

All unit tests are run with tox:

pip install tox

Then, run tox at the root of the project:

tox

cyclosible's People

Contributors

seraf avatar waffle-iron avatar

Watchers

 avatar

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.