optashift-employee-rostering build fails on openshift - gwt

Trying to build the optashift-employee-rostering project
I followed the instructions in the readme file to build the app from this repo, but it fails every time. When I try it locally on my Windows 10 with Docker and the "oc.exe" tool, it simply hangs and the oc fails to open even the openshift local console (the one on localhost).
I've created an account on openshift (Starter: US East (Virginia) For individual learning and experimenting.)
When I do it in openshift online, it fails the build but doesn't tell me the reason.
Here are the logs:
http://pasted.co/47eed571
How can I deploy this app to openshift or to some other cloud (Google Cloud/Microsoft Azure etc.)

OpenShift Online (= free edition) has less than 1GB of RAM for the build pods, which isn't enough to build it (GWT compilations needs more). That leads to error code 137 during GWT compilation.
But OpenShift Online is enough to run it.
Workaround: Build the war locally with ./provision.sh deploy employee-rostering --binary
as explained here in the readme. I hope that GWT and OpenShift play along better in the future.

Related

Mta application failing to deploy with conflict error

I had deployed the app last on friday and it got deployed successfully.But since, today morning the deployment is not happening at all.It is checking for conflicting process and failing.
I'm doing this from the webide and i'm not able to check what are the conflicting process and how to resolve it.
WebIDE lacks the ability to do proper investigation on deploying apps to SAP Cloud Foundry.
The best way to do this is to install the Cloud Foundry Multi-apps plugin (see this tutorial). This will allow you to use the local terminal to control the deployment (or alternatively use SAP Business Application Studio which already has the commands built in).
Then use the command cf mta-ops to get the list of ongoing operations and cf dmol <operation_id> to download the logs for that operation. cf deploy can be used to abort/retry operations.

AWS EB deployment - where is my app?

I packaged my Scala/LiftWeb app with the sbt one-jar plugin into a single executable jar file and packed it up with Docker, exposing the embedded Jetty's port in the Dockerfile.
It runs fine locally on Docker and appearently deploys clean on AWS EB using the CLI deployment tools. On the received EB URL however, all I see is the congrats page saying "Your Docker Container is now running in Elastic Beanstalk on your own dedicated environment in the AWS Cloud.".
So, where is my app? Do I miss any steps making my app publicly available on my EB instance?
For future reference, the problem was caused by using an obsolete 2.x version of the aws-eb-cli tools package. Upgrading it to 3.x made the error obvious - building the docker image has failed on AWS.
What I was looking for was running an existing docker image, I found instruction for this scenario at https://aws.amazon.com/blogs/aws/aws-elastic-beanstalk-for-docker/.
Thanks a lot for Nick for asking the right questions which made me realize the obsolete tools package!

Deploying Golang Applications to AWS OPSWORKS

Over the last few months I've become familiar with the AWS OpsWorks deployment process as it pertain to Node.js - deployment for Go seems to be another animal.
From what I've gathered, this is what I need to compile a successful Go deployment:
Install go on the EC2 box
Pull the private repository from GitHub
Pull in all dependencies
Compile the main package for the box's arch
Start the binary with a couple of flags that I use
Everywhere I have read seems to tout the ease of Go deployments because dependencies are included in the binary, but that seems to imply that you are compiling the application in your development environment and pushing that up to the cloud. This doesn't seem like a process that works well across a development team.
https://github.com/crowdmob/chef-golang-web-server-cookbook
I have been attempting to get the Chef Scripts from CrowdMob working, but to no avail. I continue to get errors that look like this:
[2014-08-01T16:08:22+00:00] WARN: Cookbook 'templates' is empty or entirely chefignored at /opt/aws/opsworks/current/merged-cookbooks/templates
What is the proper way to deal with dependencies during deployment?
Are there any established practices for deploying Go onto AWS with Chef?
Use a continuous integration service like CircleCi, Travis or your own setup Jenkins.
On the Continuous integration service then
Add a github post commit hook .
Test / Build the binary
Create the zip file as artifact
At this point you can create an new version on Elastic Beanstalk using the AWS commandline and the zip file created from this version.
venv/bin/aws elasticbeanstalk create-application-version ...
Then just select which version to deploy from the EB dashboard.
For simple services using Chef is overkill IMHO. Docker offers a simple workflow.
Use the Docker container option and then use elastic beanstalk's command-line client to initialize your environment in the project root directory and then you can simply do a 'git aws.push' from the same place.
With the correctly configured Dockerfile in your project and pushed to eb, the EBS' docker container app will pull the correct image with golang installed, then do a go get on your projects dependencies, and then compile and run your app. It sounds way more complicated but it's actually very easy.
Below is a link to a video walkthrough I did for running a simple golang webapp on EBS. The method for uploading the project does not use git. Instead, I zip it up and upload it, but the git method is recommended (and I do it) for automating deployment.
YouTube: How to run a go web app on Amazon's Elastic Beanstalk
I also had some problems to setup a good building process with Elastic Beanstalk and Go.. I don't want to use Docker, and all the people seems to be going on this direction.. so.. you can take a look at this project: https://github.com/battle-arena/heimdall
There you will find a custom setup using the Buildfile and the Procfile.. and I rely on a CI system to build the release package...
Basically I do the following:
Hook the commits to a CI system
On the CI system I run the test and the install.sh if all good
The install.sh will create a build folder and a structure that will be sended to the Elastic Beanstalk with the aws-cli tool
After send to the EB the Buildfile will run the build.sh that will basically extract the compressed package with the proper structure, and run a go get ./... and go build
The Procfile will run the generated binary
I think the result is pretty good, and you can use with any CI tool.

quickstart Apache DayTrader

I am trying to get the Apache DayTrader benchmarking app on OpenShift quickstart working see link https://openshift.redhat.com/app/console/application_type/quickstart!17609
I have a free 3 gear openshift online account and the quickstart starts up but then after a while posts the message
"Application creation is taking longer than expected. Please wait a few minutes, then refresh this page."
Waiting and refreshing the page shows the whole application rolled back and removed from the gear.
I suspected it might need a larger gear but I can build an openshift gear manually with JBoss Enterprise Application Platform 6 and PostgreSQL 9.2 as per requirements in a small gear
I tried manually building the application via jboss developer studio and downloaded the git locally, imported it as a general project,converted to Mavern project, started openshift application wizard and choose the jbosseap-6 app type with postgresql-9.2 cartridge and went through using the existing daytrader project.
That all seemed to work and the app was created in my openshift online gear
Cartridges
JBoss Enterprise Application Platform 6
Status: Started
Gears
1 small, Storage 1 GB PostgreSQL 9.2
the account webpage then displays
"Welcome to your JBoss EAP application on OpenShift"
but I cant seem to access the daytrader index.jsp or app from there.
If anyone has successfully built Daytrader on openshift either manually or via quickstart could they please post the steps.
I am just starting with jboss and the solution may be an absurdly simple oversight on my part.
Much appreciated John
I am assuming this is not your cartridge. If that is the case, you should try logging an issue on the github project that feeds into that quickstart here: https://github.com/gvijayar/daytrader
The creator of the cartridge should be able to help you out.
I posted ( some time ago ) the issue in github for gvijayar but there has been no reponse. I have managed to build via command line as per "Deploying from Source" making allowance for the error.
The application name needs to change in the create command to be consistent across all the commands you list.
ex:
rhc app create -a daytradereap -t jbosseap-6 -g large
but the quickstart still fails consistently.

Heroku-like services for Scala?

I love Heroku but I would prefer to develop in Scala rather than Ruby on Rails.
Does anyone know of any services like Heroku that work with Scala?
UPDATE: Heroku now officially supports Scala - see answers below for links
As of October 3rd 2011, Heroku officially supports Scala, Akka and sbt.
http://blog.heroku.com/archives/2011/10/3/scala/
Update
Heroku has just announced support for Java.
Update 2
Heroku has just announced support for Scala
Also
Check out Amazon Elastic Beanstalk.
To deploy Java applications using
Elastic Beanstalk, you simply:
Create your application as you
normally would using any editor or IDE
(e.g. Eclipse).
Package your
deployable code into a standard Java
Web Application Archive (WAR file).
Upload your WAR file to Elastic
Beanstalk using the AWS Management
Console, the AWS Toolkit for Eclipse,
the web service APIs, or the Command
Line Tools.
Deploy your application.
Behind the scenes, Elastic Beanstalk
handles the provisioning of a load
balancer and the deployment of your
WAR file to one or more EC2 instances
running the Apache Tomcat application
server.
Within a few minutes you will
be able to access your application at
a customized URL (e.g.
http://myapp.elasticbeanstalk.com/).
Once an application is running,
Elastic Beanstalk provides several
management features such as:
Easily deploy new application versions
to running environments (or rollback
to a previous version).
Access
built-in CloudWatch monitoring metrics
such as average CPU utilization,
request count, and average latency.
Receive e-mail notifications through
Amazon Simple Notification Service
when application health changes or
application servers are added or
removed.
Access Tomcat server log
files without needing to login to the
application servers.
Quickly restart
the application servers on all EC2
instances with a single command.
Another strong contender is Cloud Foundry. One of the nice features of Cloud Foundry is the ability to have a local version of "the cloud" running on your laptop so you can deploy and test offline.
I started working on the exact same thing as what you said a few weeks ago. I use Lift, which is a great framework and has a lot of potential, on top of Linux chroot environment.
I'm done with a demo version, but Linux chroot is not that stable (nor secure), so I'm now switching to FreeBSD jail on Amazon EC2, and hopefully it'll be done soon.
http://lifthub.net/
There are also other Java hosting environment including VMForce mentioned above.
If you are looking for a custom setup which also has the ease of deployment that heroku offers: http://dotcloud.com. They are invite only right now but I was given access in under three days. I am working on a Lift/MongoDB project there and it works well.
Off the top of my head, only VMForce comes to mind, but its not available yet. This will be a Java-oriented service, so that probably means you'll have to spend a wee bit of time figuring out how to package the app.
For more discussion, there was a debate about this in 2008.
I'm not entirely sure if it's really suitable or not, but people have deployed Scala applications to Google App Engine, for example http://mawson.wordpress.com/2009/04/10/first-steps-with-scala-on-google-app-engine/
Actually you can run scala on heroku right now. You don't believe it?
https://github.com/lstoll/heroku-playframework-scala
I'm not sure the tricks lstoll has used are legit but using the
new cedar platform where you can run custom processes and some
ingenious Gemfile hacking he has managed to bootstrap the Java
play platform into a process. Seems to work as he has a live
site running a test page.
Stax cloud service offers preconfigured lift project skeleton. Also, there is a tutorial on how to deploy lift project to appengine.