Code Monkey home page Code Monkey logo

nci-ansible-ui's Introduction

nci ansible ui

Simple web interface for running Ansible playbooks.

It pulls your repository with playbooks and inventories according to project config (which defines repository path, playbook and inventory directories inside repository, etc) and allows you to run playbooks with inventories via single page web interface (with live updates and pretty terminal output).

Features

  • single page web application which immediately responds to any user interaction. This app doesn't use http api, it's built using socket.io
  • online console output which is very close to terminal emulator
  • can run one playbook with different inventories (sequentially)
  • works with any Mercurial or Git repositories (no matter if it's a service like Github, Bitbucket or private server, all you need is authenticate user from which nci server is running without password e.g. by SSH key)
  • minimal dependencies (only NodeJS, SCM client and Ansible are required)
  • built on top of nci, can extend functionality by notification and other plugins

nci-ansible-ui-execution

Installation

Docker image

It's recommended setup, image for nci ansible ui contains all dependencies including ansible. You can try it using command:

docker run --rm -it -p 3000:3000 okvd/nci-ansible-ui

That's all, now you can experiment with it by adding/changing projects, use web interface (on http://127.0.0.1:3000 by default) to run playbooks.

See image page for details.

Native setup

System requirements:

  • unix-like operating system, not tested on windows
  • node.js >= 0.10
  • git client >= 1.9 (only for building git projects)
  • mercurial client >= 2.8 (only for building mercurial projects)
  • ansible
  • build tools - gcc, make, etc (for building LevelDB if binary is not provided for your platform). E.g. ubuntu build-essential package provides such tools.

On the system with satisfied requirements clone quick setup repository, go into it and install dependencies:

git clone https://github.com/node-ci/nci-ansible-ui-quick-setup &&
cd nci-ansible-ui-quick-setup &&
npm install

run server:

node_modules/.bin/nci

Now you can experiment with it by adding/changing projects, use web interface (on http://127.0.0.1:3000 by default) to run playbooks.

Sample project works with repository which contains sample playbooks (some ping, ps ax and other read commands) and inventory. Inventory defines localhost as target host with following settings:

ansible_host: 127.0.0.1
ansible_user: ansible
ansible_ssh_private_key_file: ~/.ssh/id_rsa_test

you should provide such access (ansible will be run by user which started nci server) in order to run sample project. Localhost also should be in your known hosts file (you can try this access manually to get prompt which can add it).

License

MIT

nci-ansible-ui's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nci-ansible-ui's Issues

Several Questions

So I got the UI working with the sample data but there are few things I'm having issues with and wanted to ask you.

  • I need to change the IP the server starts on. I can change it in data/config.yaml but it resets it every time it runs. How can I make the IP change permanent.
  • It doesn't look like the SCM module supports an SSH repo to pull playbooks from GitHub. For example if you change this line in data/projects/some_project/config.yaml it will not clone the repo.

repository: https://github.com/my-git/my-github-repository
repository: [email protected]:my-git/my-github-repository.git

more screenshots

Is it possible to have more screenshots, please?

Maybe a gif of how you would start running a particular playbook.

Alter the UI

Hello,
Is there any doc how to alter the ansible ui (icons, images, components)?

Use nci-ansible-ui only for Ansible, not for source control?

Is it possible to add a "none" scm type that would allow using nci-ansible-ui only as a front end to Ansible? We're using BitBucket's existing CI pipeline, so do not need the CI features.

If not, can you suggest another open source system that is similarly easy to set up as a front end to Ansible?

Getting remove error -- async remove(item)

[Mon, 22 Jun 2020 08:03:53 GMT] [app] Load plugin "nci-projects-reloader"
/usr/src/devang/nci-ansible-ui-quick-setup/node_modules/nci-projects-reloader/node_modules/chokidar/index.js:151
async remove(item) {
^^^^^^

SyntaxError: Unexpected identifier
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object. (/usr/src/devang/nci-ansible-ui-quick-setup/node_modules/nci-projects-reloader/lib/index.js:4:13)

Add --extra-vars arg ansible

Hi,

First of all, thank you for your great work ! It a very cool application for ansible, just what I need.
I have a request/question, I want to add after the "Limit" form an ExtraVard form.

I tried already to add but I don't know where to add this feature.
Where to add the variable and the form in the js/script/html ?

Thanks

On Ubuntu 16.04 doesn't work

On Ubuntu 16.04 doesn't work:
npm and build-essential installed!

# git clone https://github.com/node-ci/nci-ansible-ui-quick-setup && cd nci-ansible-ui-quick-setup && npm install
ΠšΠ»ΠΎΠ½ΠΈΡ€ΠΎΠ²Π°Π½ΠΈΠ΅ Π² Β«nci-ansible-ui-quick-setup»…
remote: Counting objects: 30, done.
remote: Total 30 (delta 0), reused 0 (delta 0), pack-reused 30
Распаковка ΠΎΠ±ΡŠΠ΅ΠΊΡ‚ΠΎΠ²: 100% (30/30), Π³ΠΎΡ‚ΠΎΠ²ΠΎ.
ΠŸΡ€ΠΎΠ²Π΅Ρ€ΠΊΠ° соСдинСния… Π³ΠΎΡ‚ΠΎΠ²ΠΎ.
loadDep:uuid β†’ resolveWit ▐ β•’β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β•Ÿ
npm WARN prefer global [email protected] should be installed with -g
npm WARN prefer global [email protected] should be installed with -g

> [email protected] install /tmp/nci-ansible-ui-quick-setup/node_modules/leveldown
> prebuild --install

/usr/bin/env: Β«nodeΒ»: НСт Ρ‚Π°ΠΊΠΎΠ³ΠΎ Ρ„Π°ΠΉΠ»Π° ΠΈΠ»ΠΈ ΠΊΠ°Ρ‚Π°Π»ΠΎΠ³Π°
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN optional Skipping failed optional dependency /nci-projects-reloader/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm ERR! Linux 4.4.0-101-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn

npm ERR! [email protected] install: `prebuild --install`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] install script 'prebuild --install'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the leveldown package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     prebuild --install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs leveldown
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls leveldown
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /tmp/nci-ansible-ui-quick-setup/npm-debug.log

npm-debug.log

doc update: build-essential is required as well

Just a quick note that build-essential is also needed in the dependency list. :)

sudo apt-get install build-essential

Most probably already have it installed, but on a virgin system dedicated to this task, it's required to build.

Running Ubuntu 16.04.3 LTS

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.