Coder Social home page Coder Social logo

outbit / bandicoot Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 564 KB

UI for the Data Center and Cloud.

License: MIT License

Python 89.63% Shell 0.26% CSS 1.09% HTML 2.22% JavaScript 4.61% Dockerfile 2.19%
ansible devops continuous-integration continuous-delivery dashboard ci automation automation-ui automation-api ansible-dashboard ansible-gui

bandicoot's Introduction

bandicoot

Travis CI PyPI version Join the chat at https://gitter.im/outbit/bandicoot https://coveralls.io/repos/out-bit/bandicoot/badge.svg?branch=master Documentation Status

bandicoot provides a simple UI for orchestrating changes or applying configurations in a datacenter and cloud environment. bandicoot provides a layer on top of Ansible that allows you to easily wrap up automated tasks and provide a simple way to execute them. The role based access control allows you to implement seperations of duties and limit specific actions to be executed by specific roles. The logging feature allows you to track the history of changes in the environment.

Installation

Install bandicoot client only. This is if you already have a dedicated bandicoot api server.

$ pip install bandicoots

Install bandicoot api server.

$ pip install bandicoots
$ sudo bandicoot-api-install

Install and Starting the bandicoot api server using Docker.

$ docker pull outbit/bandicoot
$ docker run -d -p 8088:8088 -p 80:80 -p 443:443 outbit/bandicoot

Usage

Start the API server on your localhost or on a dedicated IP. If your using the Docker container then make sure you have pulled the image and have run the image using the above example.

$ bandicoot-api -s 127.0.0.1 --insecure

Login to the bandicoot shell. On the first login you will be prompted to change the default password. If your using the Docker container you can remove the "--insecure" flag since by default its configured to use ssl. If you are using valid ssl certificates and not self signed certificates you can also remove the “-–no-check-certificates” flag.

$ bandicoot -u superadmin -s 127.0.0.1 --insecure --no-check-certificates
  Password: superadmin
  Changing Password From Default
  Enter New Password: **********
  Enter New Password Again: **********

Example of adding a "hello world" action that prints hello world.

bandicoot> help
  actions [list|del|edit|add]
  users [list|del|edit|add]
  roles [list|del|edit|add]
  secrets [list|del|edit|add|encryptpw]
  plugins [list]
  help [*]
  jobs [list|status|kill]
  schedules [add|edit|list|del]
  inventory [list|del]
  ping
  logs
  help
  stats
  exit

bandicoot> actions add name=helloworld category=/hello action=world plugin=command desc="print hello world" command_run="echo 'hello world'"

bandicoot> help
  actions [list|del|edit|add]
  users [list|del|edit|add]
  roles [list|del|edit|add]
  secrets [list|del|edit|add|encryptpw]
  plugins [list]
  help [*]
  jobs [list|status|kill]
  schedules [add|edit|list|del]
  inventory [list|del]
  ping
  logs
  help
  stats
  hello [world]
  exit

bandicoot> hello world
  hello world
  return code: 0

bandicoot> exit

License

bandicoot is released under the MIT License.

Author

David Whiteside ([email protected])

bandicoot's People

Contributors

thedavidwhiteside avatar

Watchers

 avatar

bandicoot's Issues

allow options passed to an action

allow options passed to an action, to resolve in the action dict. if an action was defined to use limit={{option.limit}}, this should be definable through options in limit=something.

For example:
outbit> actions add category=/services/webserver action=restart plugin=ansible source_url=”git://...” git_login={{ gitlogin }} git_key={{ gitkey }} playbook=test.yml sudo=yes user={{ login.name }} private-key={{ login.key }} limit={{ option.limit }}

should be usable where the limit is set to testservers
outbit> services webserver restart limit=testservers

write and use options_supported decorator

Use options_validator decorator as an example. This would provide a standard way to error if an unsupported option is provided, not all plugins would implement but its very useful for some.

secrets should have a type=file or type=text

If secret type=file, create a temporary file, set the variable to the temp filename when rendering. decrypt the secret and put it in the file. Delete the temporary file when the plugin is finished.

This is to support the ability to run the following:
outbit> actions add category=/testing/ action=ssh plugin=command command_run=”ssh -i {{secret.sshkey}} {{ option.host }}” desc="testing"

Make role permissions work

Add the ability for role permissions to be modified.
Add the ability to add users to a role.
Add the ability to add actions to a role.
Configure a default role that is a super role, that has permission to everything.
Make it so roles are enforced.

add ability to define secrets and use secrets in variables in outbit

you should be able to use secret variables throughout the outbit cli.
you should be able to define secrets as being a file or just text used inline.
if its a file it will write it to a temporary file when the plugin is executed and the variable will resolve to its path.
if its text, i will use jinja2 to parse the options string to the plugin and it will fill in the secret variables with the actual secret.
secrets will be integrated with roles so they can be shared with specific users.
secrets should be encrypted at rest in the mongodb database.

Ability To View Stats

Histogram for the below:
Jobs run per user.
Changes run per system.
Jobs run over time.

outbit> stats
0 10 20 30 40 50
user1 *******
user2 **********
user3 *****************

outbit> stats type=users
0 10 20 30 40 50
user1 *******
user2 **********
user3 *****************

outbit> stats type=system
0 10 20 30 40 50
server1 *******
server2 **********
server3 ***

outbit> stats type=jobs
0 10 20 30 40 50
07/2016 *******
08/2016 **********

option=/ does not tokenize correctly

outbit> roles edit name=super users=superadmin actions=/
action not found

might need to change:
t_OPTIONVAL =r'/[a-zA-Z0-9_/-]+'
to
t_OPTIONVAL =r'/[a-zA-Z0-9_/-]*' or r'[a-zA-Z0-9_/-]+'

trailing slash in category or missing leading / should be ok

actions add category=testing/
actions edit category=/testing/
actions edit category=testing

The above should be ok, currently it breaks things.

If no leading /, add one. If trailing slash exists, remove it. Should be a simple fix. in actions add and actions edit.

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.