acme-freight / logistics-wizard

The Logistics Wizard is an end-to-end, smart supply chain management solution that showcases how to execute hybrid cloud, microservices, and predictive data analytics in the real world.
http://logistics-wizard.mybluemix.net/
Other
0 stars 0 forks source link

Setup Dev Environment #1

Closed svennam92 closed 7 years ago

svennam92 commented 7 years ago

Instructions to setup toolchain:

  1. Create a Bluemix space.. maybe acme-freight

  2. Get your OpenWhisk authorization key: https://console.ng.bluemix.net/openwhisk/cli IMPORTANT: Make sure you are in the right bluemix space region and org in the top right. acme-freight should be the space. should look something like this:

    wsk property set --apihost openwhisk.ng.bluemix.net --auth b02eca4-93f8-4735-a616-692b28ed6dca:Z2XyZQWqUvu1HQ5WJLAqnL2Zi4N8KEwfShEAUcXsPczDcUEnOuYfgXG6kREvZMVm

    You don't need to run this command. Simply copy the auth token, which looks like:

    b02eca4-93f8-4735-a616-692b28ed6dca:Z2XyZQWqUvu1HQ5WJLAqnL2Zi4N8KEwfShEAUcXsPczDcUEnOuYfgXG6kREvZMVm

    Save this token for a later step.

  3. Go here: https://github.com/acme-freight/logistics-wizard-toolchain

  4. Click Create Toolchain button

  5. Customize your Toolchain Name on the top - something like acme-freight-toolchain

  6. In the GitHub tab under Tool Integrations, authorize it with your GitHub account. This step may fail because toolchain is buggy. If it fails, don't worry about it.

  7. Use “Existing” for all the Repository Types and check the “Track deployment of code changes” for ALL 4 repos

  8. Click the Delivery Pipeline tab under Tool Integrations,

  9. Customize your app names to something like acme-freight-sai-erp, acme-freight-sai-controller, acme-freight-sai-webui

  10. Choose the “acme-freight” space (or whatever you named your Bluemix space) along with the proper region and org

  11. Enter the openwhisk authorization key that you got in step 2

  12. Keep the coverall tokens blank for now

  13. Hit Create

  14. Wait a long time :) Maybe 10 minutes. Now is a good time to acquaint yourself with the toolchain view. In the overview page, you’ll see 4 “code” blocks and 8 “deliver” blocks. The code blocks represent the GitHub code that is being built, tested and deployed. The pipeline blocks define the steps for building testing and deploying. There are twice as many because they are tracking two branches - dev and master (prod).

  15. Check https://console.ng.bluemix.net/dashboard/cf-apps to see the status of all your apps. Ensure that you’ve chosen the acme-freight space on the top right. There should be 6 apps (3 for prod, 3 for dev). When they are all running, open the dev-acme-freight-sai-webui URL to see your own instance of the app!

By default, the pipelines track the dev and master branches. If you want to customize it so that the app is redeployed when you make changes to a particular branch, then you’ll need to jump into the pipeline and change the appropriate “Build” configurations to watch your branch rather than dev

IMPORTANT NOTE: Some of the pipeline phases may fail! This will cause your app to either not start or not work. If this is happening to you, simply rerun the failing pipeline phase and it'll fix itself.