Setting up an online GitHub/AWS development environment
You will need a GitHub and a AWS account. Both accounts are free but the AWS environment will require a credit card to get started.
Step 1. GitHub
- Login to your GitHub account or create one
Fork the ibis4template repository
This will keep your repo connected with the ibis4examle repo and we this will keep up to date with new IAF versions or improvements in the ibis4template You can merge/pull selected resources like the POM.xml without any hassle.
Step 2. AWS Account
- Login to your AWS account or create one at https://aws.amazon.com/free and create an AWS free tier account.
Step 3. TOMCAT (Server)
- Create a new Elastic beanstalk environment. Click navigation bar, choose services, header “Compute” click Elastic Beanstalk and then “Create new application”.
- Choose Actions/Create environment; you will have a series of actions to perform
- Choose predefined configuration: Tomcat and Environment type: Single instance.
- In the application version choose the sample application; after we’ve set up the environment, your .war file will be deployed here. By leaving this open for now we can make sure that our environment will work properly.
- The environment info tab gives you the opportunity to choose a name that will appear in the url for the app
- You will pass some screens where you can go for the default values. At the end you will get the chance to review your information after which you can push “Launch”
- AWS will deploy your environment container now. This can take a few minutes but the result screens should be fairly obvious:
- Optional You could build and deploy your war package, push the button left to the tomcat.
- Optional When your war file is deployed you will see it confirmed in your dashboard. When you click the upper link in the green box you will return to your dashboard.
From there there you can click the link to app. You should see the blue app appearing now in its ‘ready’ state
Step 4. Code Pipeline
- At this point we are going to create a pipeline towards the application instance that we have made. We will be able then to modify code from our github fork, and see the changes reflected in the IAF-instance. First, we will go to the developer tools and choose : CodePipeline / create pipeline.
- Give your pipeline a name and choose “Next”. On the left pane you can see which step you are in the process of creating a pipeline.
- Choose Github as your source location; the system will ask you to log in to your account after which you will be able to access your forked ibis4example app.
- Choose AWS Codebuild as the build provider:
- Give your build project a name:
- In the same screen make Ubuntu the operating system that will host a Java runtime; make sure to choose Java version 7!
- Save your build project.
- In the deploy section we are going to deploy to AWS Elastic Beanstalk, and choose the application and environment names that we have just set up.
- Let the system create you a default service-role, review your settings and launch the thing.
- You will have a message that the pipeline is created successfully. Now we can do some further testing.
Step 5. Test
- Go to the app url and check the blue boxlike icon with a ‘p’ on it; this will allow you to test a pipeline. Choose ‘HelloWorld’ in the select box, type in a message, push the ‘send’ button, and confirm the message in the result box.
- Now go to your Github account, choose the ibis4example app, navigate to the main/resources folder and start editing the HelloWorld.xml file.
Look up the ‘FixedResult’ pipe and edit the ‘returnString’ value: just change the ‘Hello World ’ into something else.
- Push the ‘Commit Changes’ button to save your changes. Go back now to your AWS and check in the pipeline view that your app starts rebuilding:
- When the build is finished and succeeded you will see all green. Test your pipeline again and see the message has changed into your Github edit.
- You have a working AWS pipeline deployment on the Ibis Adapter Framework! Now you can start developing REAL things. Good luck!