Cloud Migration Web UI

Dorin Paslaru 2bb838c46f Merge pull request #183 from smiclea/api-caller-refactor 8 lat temu
flow-typed 9eb32c4b6a Add e2e integration tests using Cypress 8 lat temu
private 9eb32c4b6a Add e2e integration tests using Cypress 8 lat temu
public 0d39a85837 Coriolis with Atomic design implementation 8 lat temu
server b1ced2f9a0 Replace Azure's API caller with the generic one 8 lat temu
src 2bb838c46f Merge pull request #183 from smiclea/api-caller-refactor 8 lat temu
.babelrc 7c2332e6d3 Replace alt.js with MobX for state management 8 lat temu
.dockerignore 4cee086424 Added Dockerfile 8 lat temu
.editorconfig 0d39a85837 Coriolis with Atomic design implementation 8 lat temu
.eslintignore 2dc2dd39d5 Add 'Planning' page with Azure Migrate support 8 lat temu
.eslintrc 7c2332e6d3 Replace alt.js with MobX for state management 8 lat temu
.flowconfig 7c2332e6d3 Replace alt.js with MobX for state management 8 lat temu
.gitignore 9eb32c4b6a Add e2e integration tests using Cypress 8 lat temu
Dockerfile 0d39a85837 Coriolis with Atomic design implementation 8 lat temu
LICENSE 0d39a85837 Coriolis with Atomic design implementation 8 lat temu
README.md 9eb32c4b6a Add e2e integration tests using Cypress 8 lat temu
cypress.json 7871881d84 Increased the timeouts 8 lat temu
package.json 2bb838c46f Merge pull request #183 from smiclea/api-caller-refactor 8 lat temu
server.js c3af7b1c18 Refactor NodeJS Server ES5 code to ES6 8 lat temu
webpack.config.js 3978b89ad2 Simplify webpack progress logging 8 lat temu
yarn.lock 2bb838c46f Merge pull request #183 from smiclea/api-caller-refactor 8 lat temu

README.md

Coriolis UI

Install instructions

  • node >=6.x and yarn are required
  • clone repo
  • run yarn install or yarn install --production to install packages and dependencies for development or production mode
  • change the coriolisUrl variable in ./src/config.js to match the Coriolis Server path

Build instructions

  • run yarn build
  • run node server.js to start the server

Your server will be running at http://localhost:3000/

Testing

  • unit tests can be run using yarn test
  • e2e integration tests can be run using yarn cypress. First though, you have to create the private/cypress/config.js file using private/cypress/config.template.js as a template and then run yarn build and node server.

Development mode

  • run yarn start to start local development server

Your development server will be running at http://localhost:3000/

This should be used only for development, as it contains live-reload and other development tools.

You can view some of the UIs components in the Storybook by running yarn storybook

Apache Configuration

Apache modules

  • enable apache modules: sudo a2enmod headers, sudo a2enmod rewrite, sudo a2enmod proxy, sudo a2enmod proxy_http
  • restart apache service: service apache2 restart

Apache CORS config

  • add this configuration to .htaccess or apache site configuration

    Header always set Access-Control-Allow-Origin "*"
    Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
    Header always set Access-Control-Max-Age "1000"
    Header always set Access-Control-Allow-Headers "x-requested-with, X-Auth-Token, X-Subject-Token, Content-Type, origin, authorization, accept, client-security-token"
    Header always set Access-Control-Allow-Credentials "true"
    Header add Access-Control-Expose-Headers "X-Subject-Token"
    # Added a rewrite to respond with a 200 SUCCESS on every OPTIONS request.
    RewriteEngine On
    RewriteCond %{REQUEST_METHOD} OPTIONS
    RewriteRule ^(.*)$ $1 [R=200,L]
    
    # Proxy matches paths to appropiate services
    ProxyPassMatch ^/identity/(.*)$ http://127.0.0.1:5000/v3/$1
    ProxyPassMatch ^/barbican/(.*)$ http://127.0.0.1:9311/$1
    ProxyPassMatch ^/coriolis/(.*)$ http://127.0.0.1:7667/v1/$1
    ProxyPassMatch ^/((?!identity|coriolis|barbican).*)$ http://127.0.0.1:3000/$1