Difficulty: beginner
Estimated Time: 10 minutes

Welcome to my Katacoda Scenarios ! I am explaining you the steps of hello world image creation.

You've completed my Katacoda scenario!

Don’t stop now! The next scenario will only take about 10 minutes to complete.

Intro To Hello world app

Hello world App

Lets Create hello world image:

Step1

Log into the system or virtual machine where App Workbench has been installed, and then execute the following commands
  • yum install -y git
  • mkdir /tmp/samples
  • cd /tmp/samples
  • git clone -b ImageSamples https://github.com/bluedatainc/solutions.git

Step2

Go to the helloworld-auto directory by executing the following commands:
  • cd solutions/ImageSamples/helloWorld-auto
  • ls -R

Step3

Create a directory on the system where the App Workbench software is installed. This directory will house all the files and components for the HelloWorld application. To do this, execute the following command: mkdir -p ~/src/catalog/helloworld

Step4

Change to your new source directory by executing the following command: cd ~/src/catalog/helloworld

Step5

Use the bdwb command to create a skeleton file structure with the appropriate directories for creating the application .bin file by executing the following commands:
  • bdwb --init
  • ls -R

Step6

Copy the Dockerfile installed during the github clone operation into the centos/ directory in your example source directory by executing the following commands:
  • mkdir ~/src/catalog/helloworld/image/centos
  • cp /tmp/samples/solutions/ImageSamples/helloWorld-auto/image/centos/Dockerfile ~/src/catalog/helloworld/image/centos/
  • cat ~/src/catalog/helloworld/image/centos/Dockerfile

Step7

Copy the helloworld-app.wb file from the sample code taken from GitHub into your example source directory
  • cp /tmp/samples/solutions/ImageSamples/helloWorld-auto/helloworld-app.wb ~/src/catalog/helloworld
  • cat -n ~/src/catalog/helloworld/helloworld-app.wb

Step8

copy the index.html file from the sample code that you downloaded from GitHub onto your example source directory
  • cp /tmp/samples/solutions/ImageSamples/helloWorld-auto/appconfig/index.html ~/src/catalog/helloworld/appconfig/
  • cat ~/src/catalog/helloworld/appconfig/index.html

Step9

Copy the helloworld-logo.png file from the sample code taken from GitHub into your example source directory cp /tmp/samples/solutions/ImageSamples/helloWorld-auto/helloworld-logo.png ~/src/catalog/helloworld/

Step10

build the image by executing the .wb file using the following command
  • ./helloworld-app.wb
  • cat staging/helloworld-centos.json

Step11

Add the new .bin file to the EPIC App Store

cp ~/src/catalog/helloworld/deliverables/bdcatalog-centos7-bluedata-helloworld-3.0.bin

Ensure the file has the correct permissions

  • chgrep apache /srv/bluedata/catalog/<bundle>.bin
  • chmod ug+rx /srv/bluedata/catalog/<bundle>.bin