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

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.

Related

Host Nuxt.js and Express.js On Ubuntu server via putty and run it all the time

I have done a project for BE and FE (Express.js and Nuxt.js), but when it build and run it via putty on ubuntu server, this is what I get
Is that a way to make it live using Putty?
And what happens if I close Putty, will Express and Nuxt still be running on the server?
This is not a conventional way of exposing something to the Internet since it's not publicly facing the Internet (the only way right now to have access to your apps is to know the IP of the server, username + password of the SSH account).
Also, you're running the server in dev mode here, not something optimized in terms of speed.
You will need to use yarn generate (or yarn build) then yarn start on Netlify, Vercel or any platform like that for your Frontend (free service usually if using SSG).
Here is a whole list of places and how to host there for the frontend: https://nuxtjs.org/deployments
As for your backend, you may host it on Heroku, Render.com, Railway or any place of your choice (with a Node.js available).
Even a bare metal SSD can be good for such but it will require more setup overall.

Is there a fast painless way to setup a linux distro on VirtualBox?

I like the Docker Hub with dockerfiles idea very much.
Is there a similar way to get a small working linux VirtualBox instance in a few commands, that could also be controlled from a command line?
Vagrant is a great tool that does just what you want and much more! It's a ruby application written for fast and simple setup of minimal development environments.
By default it creates VirtualBox images, but it supports VMWare and many others too. The whole setup of a box is managed by a single Vagrantfile! Your vm options, network settings and provisioning is done there.
Setting up a virtualbox box is as easy as executing just two shell commands. Checkout the Getting Started Guide for an example using Ubuntu.
You can use a vast range of prepared images from the Hashicorp Atlas or build your owns.
Also, vagrant doesn't limit you to one virtual machine per development setup, it enables you to model cluster setups on a single machine using multiple vms. I myself use docker for that part though.
Edit: fixed a typo :<

OpenMEAP hosted on Apache Tomcat Server via OpenShift Community

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

Smalltalk web app deployment on headless Linux server

We wrote a small prototype web app using Pharo and Seaside and we want to now demonstrate to the suits that the app can be deployed into our standard Linux build. We use a mix of CentOS, Ubuntu Server and Gentoo which are run headless since most of our apps are JAVA/Apache based. Only port 80 and 443 are open to the outside world.
What are your experiences when hosting Seaside/Smalltalk server side apps?
it runs great, btw you can get free hosting for your seaside app at:
http://www.seasidehosting.st/
for more power you'd need your own server of course...
some benchmarks here:
http://gemstonesoup.wordpress.com/2007/10/19/scaling-seaside-with-gemstones/
The Seaside Book has a chapter on deployment. It describes how I typically deploy a Seaside application.
I just use a ssh tunnel to get the X display on my local machine. I'm using slicehost (US) from the Netherlands, so I have a ping time of 135 ms. That's not that nice, but ok.
Next step will be Lukas Renggli's remote frame buffer package to use a vnc viewer.
Let's see what Miguel Cobá had to say about it on it on the Gemstone mailing list:
If you have already installed a RFB in your machine then use it.
If you have RFB installed in your image and it is accesible from your
client machine, use it
But, both of them are unencrypted. If you want to encrypted you must
setup a tunnel (maybe with ssh or maybe TLS).
I think that that is redundant because you must use a tunnel and then
the RFB. So what I do, in linux is to install the minimal X libraries
and then forward the X session to my local machine.
In the server (Debian/Ubuntu instructions):
aptitude update
aptitude install xbase-clients
aptitude install xtightvncviewer
Test it from the client machine:
ssh -X remote_server
squeakvm gemtools.image &
This will start the squeakvm process on the server, but all the graphics
will be shown on the local machine (the Xserver for this particular
scenario).
Also, if you install RFB on some of your images and start them headless,
you can use xtightvncviewer to connect to inside the image through the
RFB server.
ssh -X remote_server
xtightvncviewer localhost:0 &
this will run the xtightvncviewer on the remote server but, again, will
show on your local machine. Supposing you have your image in the remote
server running RFB in the first display.
Which is the advantage:
- You don't have to open ports for RFB on the remote server
- You transmit everything encrypted through ssh
- You only run the commands on demand in the remote server. You don't
have to have VNC running always.
- You can configure your RFB in the image to accept only localhost
connections and not from everywhere.
Martin McClure adviced me to take a look at NoMachines NX (less chatty X),
but that's still on my todo list.
For another set of deployment instructions, take a look at Miguels blog
The blogosphere's been talking about this issue recently.
Doug Putnam wrote up his experiences in installing Seaside (on Pharo) on his Slicehost slice, working off James Robertson's writeup (which uses VisualWorks, I suppose?).

Debian wheezy Linux guest environment not available

Since yesterday I can't connect through ssh to all of my Debian wheezy instances on my google cloud. I can connect only through the web console. When the web console tries to negotiate the session, there's a message telling me to update the Linux guest environment. But for wheezy, there is no Linux guest environment package.
Do you have any idea to resolve this issue ?
Debian 7 images were deprecated a while a go and as there are no update packages for the Guest Environment, the best approach would be to migrate to Debian 8 or 9.
To access your VMs you might try one of the following options:
1) According to this public issue the old guest environment still work with deprecated keys. If you have an SSH client configured with an old private key, you might still have access to your VMs through it.
2) Accessing the VM via the serial console
3) Mounting, as secondary, the original disk or a copy of it in a VM you do have access to. The steps are very similar to the section “Inspect an instance without shutting it down” on this document". That would allow you to recover your data.