tree: 274f8e2f80cb023c424a07a960cbe3c423f51e51 [path history] [tgz]
  1. Makefile
  2. README.md
  3. Vagrantfile
  4. dashboard.yaml
  5. deployment.yaml
  6. docker-compose-bootstrap.yml
  7. gateway-config.yml
  8. mocks/
  9. sample.yaml
  10. service_chain.yaml
  11. ui_containers.yaml
  12. xos-cord-branding.yaml
  13. xos.sql
  14. xos.yaml
frontend/README.md

XOS UI Development

This configuration launches the XOS GUI and database in separate containers using docker-compose. The Synchronizer is not started and there is no openstack backend connected for XOS. This configuration is intended for developing the XOS GUI.

Getting Started

  • Navigate to /service-profile/configurations/frontend folder
  • Run make command

You'll be able to visit XOS at 0.0.0.0:9000 and the xos/core/xoslib folder is shared with the container. This means that any update to that folder is automatically reported in the container.

Working on the Django Application

If you need to work on the Django application itself:

  • comment out the sleep 86400 command for the xos_bootstrap_ui container in docker-compose-bootstrap.yml
  • comment the python /opt/xos/manage.py runserver 0.0.0.0:9998 --insecure --makemigrations in the same file
  • run make local_containers.
  • run make

You'll notice that the make command will hang on to Waiting for XOS to start listening on port 9998, so in another shell:

  • run make enter-bootstrap-ui, this will bring you inside the running bootstrap container
  • from inside the bootstrap container run python /opt/xos/manage.py runserver 0.0.0.0:9998 --insecure --makemigrations

As this command finish his execution you'll notice that the make command will resume and end. Once it has endend your development environment is up and running.

If you are working on core files (not involving services) you can use the bootstrap_ui container as target, so connect to port 9998. To simplify the development xos/core and xos/api/utility folders are shared between the host filesystem and the container, so you don't have to manually copy file inside the the running bootstrap_ui container.

If instead you are working on services or services API your target container should be the ui container, so connect to port 9999. Note that the ui container can be rebuilt from the synchronizer container, and it will pull the container in the docker registry, not your local one.

NOTE: Please be careful and do not commit migrations, private keys or other autogenerated files.

Using Vagrant

Vagrant environment is provided with a ubuntu_14.04 box (ubuntu/trusty64).

It will run xos on the following address 192.168.46.100:9999.

It will also share the service-profile and xos folder with the vagrant box. These two directory are intended to be side by side.

How to set it up:

  • Start the Vagrant box: vagrant up
  • Enter Vagrant box: vagrant ssh
  • Start XOS: cd /opt/service-profile/frontend and run make

Docs

You can find a Swagger documentation for endpoint at: http://0.0.0.0:9000/docs/

Populate the Data Model with custom data

Sometimes while developing the GUI is usefull to have control over the DataModel. Sample tosca recipes for different configuration are defined in the mocks folder, and corresponding make commands are provided.

  • Bring up the CORD data model: make mock-cord
    • Bring up the M-CORD data model: make mock-mcord

JS Styleguide

This project is following Google JavaScript Style Guide. To contribute please install Eslint in your editor and run npm run eslint before commit.

NOTE: Many of the already present file were not Style compliant. Linting for them has been disabled as it was to time consuming fix all of them. If you are going to work on that files, please start fixing style issues, and then remove the /* eslint-disable */ comment