Setting Up a Development Environment

This page describes how to setup a working development environment that can be used in developing skyline-console on Linux. These instructions assume you’re already familiar with git. Refer to GettingTheCode for additional information.

Following these instructions will allow you to run the skyline-console unit tests.

Linux Systems

Install system dependencies

  • Ubuntu/Debian

    sudo apt-get install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb
    
  • CentOS

    yum install -y xorg-x11-server-Xvfb gtk2-devel gtk3-devel libnotify-devel GConf2 nss libXScrnSaver alsa-lib
    

Getting the code

Grab the code:

git clone https://opendev.org/openstack/skyline-console.git
cd skyline-console

Setup Your Local Development Env

  • Install nvm ( version control system for nodejs )

    wget -P /root/ --tries=10 --retry-connrefused --waitretry=60 --no-dns-cache --no-cache  https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh
    bash /root/install.sh
    . /root/.nvm/nvm.sh
    
  • Install nodejs

    nvm install --lts=Erbium
    nvm alias default lts/erbium
    nvm use default
    
  • Verify nodejs and npm versions

    node -v
    # v12.*.*
    npm -v
    # 6.*.*
    
  • Install yarn

    npm install -g yarn
    
  • Install the project dependency under the root directory, with package.json in the same place.

    yarn install
    

    After those steps, please just wait until the installation is complete.

You can also use the following commands:

  • yarn run mock: Use the mock interface of rap2

  • yarn run dev: To use the actual interface, you can copy config/config.yaml to config/local_config.yaml , and replace the server value with the correct address.

  • yarn run build: Build packages and then you can hand over the contents of the generated dist directory to the back end.

For more information about configuration, see Skyline Console Settings Reference.

Running tests

  • e2e tests

    yarn run test:e2e
    
  • unit tests

    yarn run test:unit
    

Contributing Your Work

Once your work is complete you may wish to contribute it to the project. skyline-console uses the Gerrit code review system. For information on how to submit your branch to Gerrit, see GerritWorkflow.