OpenMEAP hosted on Apache Tomcat Server via OpenShift Community - apache

I'm preparing a development environment primarily for developing enterprise class cross-platform mobile hybrid apps and after much research I've decided to implement OpenMEAP on an Apache RedHat Cloud OpenShift container for advanced app management and services. The combination of these two could be interesting competition to commercial Mobile Enterprise Application Platforms.
I have my Eclipse setup properly to publish OpenMEAP to OpenShift Community Cloud and I can successfully create, build and deploy the OpenMEAP SLIC to Android devices and emulators after carefully following the instructions in these guides and videos:
OpenMEAP Windows Installation Video
Get free Apache Tomcat Hosting in the Cloud for Java Applications at OpenShift Video
I have only warnings in the Eclipse project. When I publish openmeap-admin-web and openmeap-services-web to the OpenShift container the WAR files are published but they don't expand and therefore cannot be accessed from the tomcat server over the web. If I could get past this problem I could proceed with actual development instead of the exhausting environment prep.
I know it's a long shot but is anyone attempting to use OpenMEAP with OpenShift (or any other cloud based Tomcat server)? I would also like to discuss OpenMEAP database requirements for an OpenShift (or Cloud) Apache Tomcat setup.
Any comment is extremely appreciated.

I don't have any experience onboarding OpenMEAD to OpenShift, but there are some things on the OpenShift Online community that you can review to see if it helps:
1) Troubleshooting with Logs: https://www.openshift.com/faq/how-to-troubleshoot-application-issues-using-logs
2) Onboarding vanilla Tomcat: https://www.openshift.com/blogs/free-apache-tomcat-hosting-in-the-cloud-for-java-applications-its-called-openshift
The later is onboarding Tomcat with a DIY cartridge. What cartridges are you using?
Feel free to post to feedback to the OpenShift forums as well: https://www.openshift.com/forums/openshift

You can deploy OpenMEAP on OpenShift from their quickstart page.
Once you've created the quickstart, you'll need to add your authorization information to your Git repository. Making code changes will require you to set a public SSH key, and then to clone your new application Git repository onto your local machine. See the Getting Started page for more steps in this flow.
Step 1. Get Your Application UUID
Get your application uuid by going to the OpenShift Management Console and select the app name to copy the UUID or run this command: rhc app show $appname | grep -i uuid
Go to the administrative interface of the OpenMEAP instance: https://$appname-$yournamespace.rhcloud.com/openmeap-admin-web/interface/
Log in using the default credentials (userid/password): openshift/openmeap
From the Main Menu, navigate to Settings.
Under Global Settings & Preferences and Cluster Nodes set the following values:
External Service URL: https://$appname-$yournamespace.rhcloud.com/openmeap-services-web
File-system Storage Path Prefix: /var/lib/openshift/<application-uuid>/app-root/data
Admin Server Accessible Service Url Prefix: https://$appname-$yournamespace.rhcloud.com/openmeap-services-web
File-system Storage Path Prefix: /var/lib/openshift/<application-uuid>/app-root/data
Step 2. Build Your Mobile Clients!
Use: openmeap.slic.appMgmtServiceUrl=https://$appname-$yournamespace.rhcloud.com/openmeap-services-web/application-management
More Information
For OpenMEAP developer resources visit http://wiki.openmeap.com
For more info on OpenMEAP in general visit http://www.openmeap.com
Uses jbossews-2.0 with code from https://github.com/OpenMEAP/openshift-openmeap-quickstart

Related

The best way of develop with Open shift origin: VM or local installation

What is the best way to develop with open shift origin? Is it using vm or install it locally? I have tried installing the vm and I could not login to the vm. What is the default credential used to login to fedora vm.
Default credentials
Depending on which route you follow (see below) there might or might not be real authorization in place.
If you have the AllowAllPasswordIdentityProvider in place you can get away with test/test or whatever.
If you take the binary version (see below) this is what you'll have by default. I changed it to be HTPasswdPasswordIdentityProvider instead.
For the other options I think you will have a user called system, with the password admin coming with the setup.
Docker container version
You can quickly get OpenShift running in a Docker container using
images from Docker Hub on a Linux system. This method is supported on
Fedora, CentOS, and Red Hat Enterprise Linux (RHEL) hosts only.
Link: https://docs.openshift.org/latest/getting_started/administrators.html#running-in-a-docker-container
As per the origin folks, this setup is not (yet) a full example, but very easy to get started with. You should be able to follow the instructions to get an all-in-one instance up and running in no time. However, this approach cannot teach you how to create a cluster (master(s) and node(s))
Vagrant VM
This image is based off of OpenShift Origin and is a fully functioning
OpenShift instance with an integrated Docker registry. The intent of
this project is to allow Web developers and other interested parties
to run OpenShift V3 on their own computer. Given the way it is
configured, the VM will appear to your local machine as if it was
running somewhere off the machine.
The OpenShift Master, Node, Docker Registry, and other pieces are running in one VM. Given it's focus on application developers, it should NOT be used in production.
Link: https://www.openshift.org/vm
Binary option
Red Hat periodically publishes binaries to GitHub, which you can
download on the OpenShift Origin Releases page.
Link: https://github.com/openshift/origin/releases
This is the option I follow currently. You download the binaries, install GO, then setup the OC client tools. Next step you generate the configuration files and start adding your system components (router, ...).
Follow this page to understand the basics:
Link: https://github.com/openshift/origin/blob/master/examples/sample-app/README.md
Ansible route
For production installation you probably want to install your cluster via Ansible.
My humble advice is to do this once you got a bit of an experience via configuring by hand (see previous point). Let's hear some people with more experience though.
Link: https://docs.openshift.org/latest/install_config/install/index.html
Documentation in general
Link: https://docs.openshift.org/latest/install_config/master_node_configuration.html#creating-new-configuration-files
Spin up a Centos.7 VM, download the latest origin tools:
wget https://github.com/openshift/origin/releases/download/v1.3.0-alpha.2/openshift-origin-client-tools-v1.3.0-alpha.2-983578e-linux-64bit.tar.gz
tar xzvf openshift-origin-client-tools-v1.3.0-alpha.2-983578e-linux-64bit.tar.gz
ln -s /root/openshift-origin-client-tools-v1.3.0-alpha.2-983578e-linux-64bit/oc /usr/local/bin/oc
chmod 755 /root/openshift-origin-client-tools-v1.3.0-alpha.2-983578e-linux-64bit/oc
Bring up your single node origin cluster:
oc cluster up --use-existing-config --host-data-dir=/var/tmp/etcd
Login using the instructions provided.

How to deploy a local eclipse worklight project in cloud server?

I developed an android based hybrid app in the IBM MFP-7.0., My app is fetching the data from the Java service which is running in Tomcat Server. Here the app adapters are running in my local system MFP server to get the data from the Java service, So that I can only run the app in my local system android emulator. Now, we want to deploy the app in the cloud so that we can give this app to our users. Can some body help me how to run our MFP app in the cloud? Is it required to place eclipse in the cloud to run my MFP server like the way I am running in my local system?
Thanks in advance.
It looks to me like your understanding is completely lacking in this subject matter. Also note that this question has got nothing to do with programming.
You need a host machine. On this server you will run an application server (Tomcat, WebSphere Full profile, WebSphere Liberty profile - either single or a farm, depending on your required network topology and security & scalability needs).
On this application server you deploy MobileFirst
You will also need a database
This host machine needs to be accessible (with appropriate security) to the public Internet so that it could serve apps installed in end-users' devices
The application needs to be configured to send requests to the server (or to any front-side server like a Load Balancer, again, depending on your topology)
The generated application needs to be submitted to an App Store so that users could download and install it on their devices
I suggest that you will do some reading before asking any question. Since you're using IBM MobileFirst, start by reading the user documentation: http://www-01.ibm.com/support/knowledgecenter/SSNJXP/welcome.html

How to install Laravel app to free web hosting?

I've been serving my Laravel app on my local machine (MAC OSX Maverick) via the php artisan serve command in the terminal.
How do I install it to my a free a hosting for testing? Technically, I only have a free web hosting account. This means I can't perform any command-line commands (SSH). Is there any simple way to install it? Can I just simply copy my Laravel app folder and put it on a web host?
Easiest solution: Deploy it to OpenShift using a Laravel QuickStart. OpenShift is free, gives you SSH access, and basing your app off the Laravel QuickStart should handle the more complicated configuration bits.
"Can I just simply copy my Laravel app folder and put it on a web host?"
Pretty much this is the answer. You can upload your entire Laravel application to your webserver, and it should work.
But I'll warn you now that without command-line access - your going to have issues in the future. Try and find an alternative host for your website that provides command line access

Vagrant in production

I've been reading about Vagrant, and I find it quite useful for my development. I am currently managing a series of services (mail, web, LDAP, file sharing, etc.), and often one of these falls and needs a quick backup. Is it possible (and recommended) to use Vagrant for these purposes?
So far I've virtual machines installed like real machines.
I would also like to know about an alternative to Vagrant which would allow me to setup a simple configuration file and put a virtual machine, for example, with Zimbra, and quickly have an alternate mail server, enable RabbitMQ, etc.
Vagrant should be used more like a staging environment to test your infrastructure changes. It should be your test bed for automated infrastructure changes.
The way we use it at my company is like so:
Create VMs for our managed servers in Vagrant.
Create puppet definitions for each server.
Create cucumber tests for each server.
Make infrastructure changes via puppet and add cucumber tests.
Launch our servers to test for failures.
Fix bugs, release and/or back to step 4.
Basically when we're happy with our changes, we'll pull our puppet changes into production to make it happen.
I'd not recommend using vagrant to manage VMs for real production. I'd use something else like razor, virsh, OpenStack or one of the many other vm management systems out there.
This page suggests that the Vagrant push command is meant for deploying to production:
https://www.hashicorp.com/blog/vagrant-push-one-command-to-deploy-any-application/
"Additionally, multiple config.push.define declarations can be in a Vagrantfile to define multiple pushes, perhaps one to staging and one to production, for example."
From my experience, Vagrant mainly used in a development environment.
Vagrant configuration and provisioning options are limited compared to Terraform for example.
If you are working on a cloud based environment, you can use Terraform for infrastructure provisioning.
If your environment is local or your VMs will be hosted on a datacenter, you can use Ansible, chef or puppet for you configuration management and automation.
Hashicorp just published Otto, which is meant to be the Vagrant's successor. It is designed to support deployment environments.
From their Github page:
The key features of Otto are:
Automatic development environments: Otto detects your application
type and builds a development environment tailored specifically for that
application, with zero or minimal configuration. If your application depends
on other services (such as a database), it'll automatically configure and
start those services in your development environment for you.
Built for Microservices: Otto understands dependencies and versioning
and can automatically deploy and configure an application and all
of its dependencies for any environment. An application only needs to
tell Otto its immediate dependencies; dependencies of dependencies are
automatically detected and configured.
Deployment: Otto knows how to deploy applications as well develop
them. Whether your application is a modern microservice, a legacy
monolith, or something in between, Otto can deploy your application to any
environment.
Docker: Otto can use Docker to download and start dependencies
for development to simplify microservices. Applications can be containerized
automatically to make deployments easier without changing the developer
workflow.
Production-hardened tooling: Otto uses production-hardened tooling to
build development environments (Vagrant),
launch servers (Terraform), configure
services (Consul), and more. Otto builds on
tools that powers the world's largest websites.
Otto automatically installs and manages all of this tooling, so you don't
have to.
I had the same question and have been investigating the use of Vagrant push which as per their documentation, as of version 1.7, Vagrant is capable of deploying or "pushing" application code in the same directory as your Vagrantfile to a remote such as an FTP server.
I'm considering having vagrant spin up in a VM for developers, while also giving you the option to deploy your code to a live server for production environments.
As mentioned by #andrerpena, Otto is the successor of Vagrant.
From www.ottoproject.io :
Otto can deploy your application. Users of Vagrant for years have wanted a way to deploy their Vagrant environments to production. Unfortunately, the Vagrantfile doesn't contain enough information to build a proper production environment with industry best practices. An Appfile is made to encode this knowledge, and deployment is a single command away.

iGoogle Gadget private development

I'd like to host a Google Gadget on our production app server which will provide a means of authentication and display some interesting information from our database.
Obviously I'd prefer to develop and test this outside of our production site.
Is there any means of testing testing a Gadget that is hosted on my dev box? I'm new to gadget development, but as I understand it they need accessible over the internet to run.
Gadgets do not have to be accessible over the public internet to run - just somewhere accessible by the server / page / portal that's trying to use them.
There are several ways you can test your Gadgets -
You can test it by deploying to your own iGoogle page rather than the production portal. Your gadget would have to be internet accessible in this case.
Several Java Portal servers can host Google Gadgets. (LifeRay, Sun Java System Portal Server, Weblogic Portal Server, JBoss Portal Server / GateIn, and many more.) You can run these locally on your development machine / network - so your gadget can just run locally.
Also, Apache has the Shindig project - an OpenSocial and Google Gadgets container - there are Java and PHP implementations available.