Ansible UI project starting tomorrow -- here's what you need to know

So with the REST service basically operational, it's time to start the
web interface. You should already make sure you can set up the REST
interface if you want to help with the webapp, let me know if you have
questions.

Here's what's going to happen.

I'm going to set up a basic scaffolding for things in
https://github.com/ansible/ansible-commander in a directory called
'ui' tomorrow. I'll let you know when this is available.

We'll be going with bootstrap and angular.js as tools -- bootstrap has
a lot of community examples available and angular looks nice and easy
to use, and I have been highly impressed with some of the examples
Marco Moscaritolo has shown so far.

The static content is going to be served *however* for now, but I'd
love some patches to get it served out of Flask so we can not think
about things. Flask experts -- help welcome, I had a bit of trouble
trying to get the static_folder stuff working today.

I thought about making the playbook set up Apache for you, but that in
the end is a terrible thing to do because between distros everybody's
Apache is different. Examples for how to run Flask in a nice best
practices way with the commander app are welcome, and if people
want to restructure the way commander/acom is layed out, please send
me pull requests -- it's stable enough to accept them now.

Once we have the basic thing going and can prove it can log in and
make some basic rest activity, etc -- development is pretty much open
to everyone and folks can do as little or as much as they want. I'm
not going to hog any of the fun this time as I figure I have
more to learn from you and I'd just be holding us back :slight_smile:

Features we have in the first release need to include the following
before adding new features:

ability to login and log out

see all the groups

click on a group and you can:
   edit the comment
   add and remove hosts
   edit variables by editing JSON in a text field
   delete the group (confirmation should be required)

from a given group workview, list hosts in that group

click on a host in a group and you can
   edit the comment
   edit variables by editing JSON in a text field
   delete the host (deletes it, not just removes if from the group,
confirmation should be required)

list users
    edit the comment
    if you are logged in as that user, or as admin, you can change the
user's password
    delete the user if you are logged in as that user or if you are
logged in as admin, but admin cannot delete himself

The next release will result in subtle expansion of the REST API and
we can start doing more things.

Future things are up to everyone's imagination but may include viewing
facts for each system, fact search, viewing logs and
results/dashboards, embedding module docs, renaming objects, browsing
playbooks, maybe executing playbooks and commands, etc

--Michael

Hi Michael,
why use the same project of ansible-command and not a separate repository? Separate service from UI will be better to have small codebase in each project and make more simple have different interface (desktop/mobile/…) to access to ansible-comander.

I’m not angular guru but if you require some support or I can help you, you must just ask :slight_smile:

ps: start with pure js/html without bootstrap and add it after application work :wink:

Hi Michael,
  why use the same project of ansible-command and not a separate repository?
Separate service from UI will be better to have small codebase in each
project and make more simple have different interface (desktop/mobile/...)
to access to ansible-comander.

It's fine if different interfaces crop up, but there are numerous
reasons for this:

(A) Easier to make atomic changes across both when someone wants to
add a new REST API and also the UI component to prove it out, I don't
have to review seperate merge commits in two different repos. This
also makes releasing, testing, and making sure you have the latest
version of each a lot easier.

(B) Most users will want the UI, and the REST API is just something
under the covers. Don't make them go through the hassle of setting up
two seperate projects.

(C) If someone wants just the REST API and not the UI, they can
choose to not install it or just install it and not use it. However,
I believe most everyone will want it.

I'm not angular guru but if you require some support or I can help you, you
must just ask :slight_smile:

Will do! I suspect there will be lots of room for you do however
much as you like (goes for everyone).

I really want this to be a community effort -- getting the REST API
going was somewhat hard, but I suspect the interface will be something
folks find it really easy to hack on.

--Michael

It was stopped earlier due to some resource constraints.

I've been doing some API planning very recently,and am kicking off
again in full early next week.

Not rocket science, so should evolve pretty quickly.

Stay tuned!