-
Notifications
You must be signed in to change notification settings - Fork 0
Developer_Setup
mparizernc edited this page Oct 17, 2016
·
1 revision
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
- All files needed are in the ozp-ansible repo
git clone https://github.com/ozoneplatform/ozp-ansible.git
- rename the vault file
mv group_vars/all/vault_unencrypted.yml group_vars/all/vault.yml
vagrant up
- the first time you run this it will take about 30 min depending on your internet connection
- 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
- If you are using PKI Authentication Download and install test certificates into your browser
- https://github.com/ozoneplatform/ozp-ansible/blob/master/roles/ssl_certs/files/wsmith.p12
- test cert for winston smith password is password
- Test Center, HUD, the API, and the API Docs
- Center - https://localhost:4440/center/
- HUD - https://localhost:4440/hud/
- API - https://localhost:4440/api/
- API Docs - https://localhost:4440/docs/
- 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.
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
- 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-centerrepo in your profile directory to which you have full commit access
- clone your fork of
ozp-center
git clone https://github.com/<username>/ozp-center
- from the
ozp-centerdirectory run the following commands
npm installnode -vnpm -v
- 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
- Test
- VirtualBox OZP API - https://localhost:4440/api/
- Local Development
- OZP Center - http://localhost:8000/dist/
- OZP HUD - http://localhost:8088/dist/
- If you have any issue with getting the environment setup please submit a GitHub issue
- If you have additional notes/steps to add please fork the wiki and submit a pull request
- 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 restartsudo service gunicorn_ozp restartsudo service nginx restart
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 falseand ensuring that.gitattributeshas 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 thepackage.json. By replacing NODE_ENV="production" gulp build inpackage.jsonto set NODE_ENV=production&& gulp build