Skip to content
mparizernc edited this page Oct 17, 2016 · 1 revision

Build and install an instance of OZP

Pre-requisites

  • VirtualBox 5.0.14
  • Vagrant 1.8.1
  • MacOS or Ubuntu (This has not been tested on Windows for Windows troubleshooting see section below)
  • Installation may work with later versions of listed software but are not tested to confirm at the time of writing.

Build and install OZP

  1. All files needed are in the ozp-ansible repo
  • git clone https://github.com/ozoneplatform/ozp-ansible.git
  1. rename the vault file
  • mv group_vars/all/vault_unencrypted.yml group_vars/all/vault.yml
  1. vagrant up
  • the first time you run this it will take about 30 min depending on your internet connection
  1. Default mode of authentication is username and passwords
  • A list of test usernames have been added to the database and can be found here in the README.md
  • Users deploying to a production environment should remove these prior to going live
  1. If you are using PKI Authentication Download and install test certificates into your browser
  1. Test Center, HUD, the API, and the API Docs
  1. If these all work you have a full copy of the Ozone Platform running on a VirtualBox on your machine. Now we can setup a development environment.If you don't plan to develop code and only want to test OZP you can stop here.

Setup your development environment

Pre-requisites

  • a text editor such as Atom - https://atom.io/
  • node 5.5.0
  • npm 3.3.12
    • npm install -g npm@3.3.12
  • Installation may work with later versions of listed software but are not tested to confirm at the time of writing.

These are the same steps for Center, HUD, Webtop and IWC. Just change the directory for the different products

  1. Fork the ozp-center repo
  • Fork the ozp-center repo at https://github.com/ozoneplatform/ozp-center
  • You should now have a clone of the ozp-center repo in your profile directory to which you have full commit access
  1. clone your fork of ozp-center
  • git clone https://github.com/<username>/ozp-center
  1. from the ozp-center directory run the following commands
  • npm install
  • node -v
  • npm -v
  1. If npm install runs without errors, You are now ready to run your local copy of ozp-center using your VirtualBoxes OZP backend
  • API_URL="https://localhost:4440/" npm start
  1. Test
  1. If you have any issue with getting the environment setup please submit a GitHub issue
  2. If you have additional notes/steps to add please fork the wiki and submit a pull request
  3. Now start contribution to an Open Source project
  • Fix a bug, fix a GitHub issue, create a new feature and submit a pull request. We appreciate any contributions from the community

##Troubleshooting Common commands to restart services when you get a 500 or 502 error

  • first vagrant ssh
  • sudo service gunicorn_demoauth restart
  • sudo service gunicorn_ozp restart
  • sudo service nginx restart

Windows Troubleshooting

Although not tested extensively, some have reported being successful in following these instructions under Windows. Some caveats:

  • For best results, consider installing Cygwin and running the provided instructions from its Bash shell
  • There are known issues with Vagrant 1.8.1 in its handling of paths under Windows. These are to be fixed in the upcoming version 1.8.2. However, in the interim, the Ruby files can be patched manually under C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.8.1\plugins\provisioners\ansible
  • Make sure to setup your git configuration not to have EOL converted to CRLF by setting git config core.autocrlf false and ensuring that .gitattributes has the following entries. Failing to do so may result in false error messages complaining about missing files.
  • * text=auto
  • *.initd text eof=lf
  • *.sh text eof=lf
  • If 'NODE_ENV' is not recognized as an internal or external command,operable program or batch file. is encountred try modifying the package.json. By replacing NODE_ENV="production" gulp build in package.json to set NODE_ENV=production&& gulp build

Clone this wiki locally