Install Linux with Desktop Environment via jClouds/Apache Brooklyn - jclouds

I want to install a Linux machine (preferably Red Hat) with a Desktop Environment (lets say Xcfe, but it could be another one) via Brooklyn (with jClouds).
In the same way that in Apache Brooklyn there is a VanillaWindowsProcess which installs a Windows machine which it is accessible via Remote Desktop, I want to do it something similar (with VanillaSoftwareProcess) but for Linux.
Is there something to add to the Blueprint or should I do it programmatically? I mean, execute a blueprint with a wrapper of the VanillaSoftwareProcess which after the installation, launches the commands to install the desktop.environment.

As far as I know, there is no blueprint which does that yet.
But as you said, you can achieve this by using a VanillaSoftwareProcess entity, like so:
name: RHEL with desktop GUI
location:
jclouds:aws-ec2:
region: <your-region>
identity: <your-identity>
credential: <your-credential>
osFamily: RHEL
services:
- type: org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess
install.command: |
# Command to install you desktop GUI here...
launch.command: |
# Command to launch your desktop GUI here...

Related

How to launch a JAVA GUI App inside a Linux Container from a Windows Host without 3rd party X Server

I have a Linux container with a JAVA GUI Application that I'm trying to run from a Windows Host. Based on my research you can run a GUI app on a Windows host by installing 3rd party software like VcXsrv Windows X Server. Sadly, I'm don't have admin privileges so I can't install software freely also this process requires to disable Windows Access Control.
Is there a way that you can run a GUI app inside a Linux container from a Windows host without using 3rd party software?
Thanks in advance.

Base Docker image from existing Windows machine

We have a large application with several parts running on a Windows VM and I am trying to evaluate Docker containers for our application deployment. Is it possible to create a base docker image from an existing Windows VM already running my application? (I know this can be done using Dockerfile but I am looking for a quick way to create the image)
https://docs.docker.com/engine/userguide/eng-image/baseimages/
Above link describes creating image from working machine for Linux, but I am looking for something similar for Windows.
The only base image for Windows that I know are the ones proposed by Microsoft, for Windows Server 2016 or 1709.
See "PoC: How to build images for 1709 without 1709"
That means you can translate any Widows VM into an image.
You would need:
a Dockerfile
the right Microsoft base image, which would represent a Windows server one.
Typically:
microsoft/nanoserver,
microsoft/windowsservercore
If you application only runs on a Windows VM, you need to make sure it can be installed and run on one of those base Windows images.
EVen though you are using a VM Windows server 2016, you would not be able to quickly "capture its state": you need a Dockerfile to describe what you want your Widows container to run.
No it's not possible. You have some stuff like Vm2Docker etc but all it does the same thing you will do manually that is enumerate features installed and create some artifacts for you.
But it's not possible to do for third party application as you mentioned. You'd have to disassemble it and figure out how to scripts to install it.
I am looking for a way to have a Development environment of Production web server for our Developers/testers created using Docker on windows.
I have windows server 2016 OS installed on a Physical server (not VM), and want to dockerize it so that Dev team can make changes on it first and once they confirm all working fine then same changes will be done on production web server.
Thanks,
RK.

what programs can be installed in a docker container

I am a Windows user.
I have looked at the official Docker tutorial "Get Started". The example focus is a python app. I don't know python and I guess a Docker container can have many programs installed as an environment, not just python.
Is Docker good for testing a program I download from the internet in an isolated environment (like a sandbox in firewalls or antivirus) ?
How for example can I make a container that has an environment containing installed programs like Visual Studio, VLC player, Office, etc.?
Thanks,
Abe
Yes; you can have an isolated environment with docker. You can set your desired configurations, download from internet, install, and whatever you do in a Virtual Machine.
Yes, you can. What your container contains depends on the base image you create it FROM and packages you install inside of it.
Tips
You can build your container from an empty OS (e.g. ubuntu), configure the OS, download/install/configure/run whatever you want.
You can create a base image which derives FROM a suitable OS, then install any basic application (e.g. firefox) which you may use in a lot of containers on it. Then you should push it in a registry (e.g. Github). After that, you can use it as a base image for other containers, so your new containers have installed applications by default; no need to install them again. It reduces complexity and repetitions in Dockerfile.

Is it possible to devep web applications (PHP/Ruby) using Docker without PHP/Ruby on host?

As in the question. Can you actually use Docker on top of Linux system (Ubuntu) that has NO php or ruby installed? I use postgres image for database and (of course) postgres package is not installed on my host.
I wonder if it is possible to use containers for development. How to overcome lack on rails new/rails g on host?
Docker environment it's completely independent of your host - they have the own library, packages installed inside of them. If you want to run ruby/php inside docker, just download proper image which contains ruby/php or build own image.
For ruby check this link: https://hub.docker.com/_/ruby/

How to run a X Windows application in Codenvy Cloud IDE?

Copdenvy's shellinabox runner allows you to start a shell in the browser in which you can compile and run your code. This is fine for applications that are console based. Is it possible to run an X Windows application in the cloud and see the graphical window?
Setting the DISPLAY variable in the shell to that of your Linux workstation could work, though it relies on you being in control of the local network for things like NAT and firewall settings. The attraction of the cloud IDE is that you only need a browser and an https connection.
Can you ssh -X into the Docker container from an X capable source? Where would you find the URL? How would you manage the ssh keys?
If you look at the Java/Swing "VNC + Java 7" runner for example you'll see that you're able to run an application which is using X DISPLAY through VNC. Codenvy supplies a web based X Windows environment that you can access by clicking on the hyperlink that is shown underneath the Console window, to the left of the Timeout counter. You can then look at the Docker recipe used to start this sample.
SSH in the docker container could be managed in Codenvy 3.x if you install inside the VM the sshd daemon and export the ssh/22 port. In upcoming Codenvy SaaS 4.x ssh will be enabled without any configuration.

Resources