Multiple applications and plugins for docker build? - java

So I am relatively new to Docker and I was wondering if there is a way with either docker-compose or cloud-cli to create a Java environment with different plugins and other software needed for an application?
For example, I would like to start with configuring Eclipse, Java, Tomcat, and Maven together as one environment natively. And if so could you explain and maybe show an example of how to do this? I am on a Windows 10 machine.
Thanks in advance.

You can totally do that using Docker-compose for java, tomcat and maven.
For eclipse it will be kinda problematic since it's a graphical application, but you still can do it using volumes.
You could also consider using Vagrant if it's for a development environment.

Related

Ways to create a mapreduce web application

I want to create a website, and part of the website I will implemented with(Hadoop mapreduce). I start using the Eclipse with maven plugin, on my operating system (Mac OS).
I start coding with apache maven for my code. "I still not implement the website".
My question does the maven run with cluster of machines or not?
any advice of how can I create a website with part run in mapreduce??
Please help
Thanks all
Apahe Maven is not "something, that runs our code". It's actually a build tool: Apache Maven is a software project management and comprehension tool. (https://maven.apache.org/). You can manage dependencies, build, deploy and do other related stuff.
If you want some interface to your cluster, I recommend to look at zeppelin (https://zeppelin.apache.org/).
It's an interpreter for a bunch of stuff and it can be easily deployed to your server (I did it by building sources from https://github.com/apache/zeppelin and running it). Zeppelin's spark interpreter can be run in yarn-client mode, which just submits your code to cluster (yarn hadoop cluster in my case) and runs it.
Seems pretty similar to your description.
The answer to your question: maven had nothing to do with "running on cluster".

Automate process for creating environment

I heard of puppet and chef for creating the environment on the fly. But that is on big level.
I was thinking whenever a programmer gets new machine he has to install java, maven etc which are basic tools to start with for any Java/J2EE programmer. And for version of each tools- either it's latest version or as per project structure.
Is there any way to automate this file. Just like a bash file (on windows) or something which can install all these basic tools with desired version. Any hint to start with will be great.
Thank you.

Work with docker and IDE

To share installation, we decided to work with docker. For each project, global dependencies are installed inside the container.
We are developping with Python (and Java, but at this time, let's speak about Python only ;) )
Working with Vim (for example), I want to use code completion, but because the entire libs are installed in container, my vim installation on host cannot access them. This is true with Java, Javascript, and so on and it's absolutly normal...
But is there any solution to be able to work with container, getting access to libs for IDE, without to install IDE in the container itself ?
But is there any solution to be able to work with container, getting
access to libs for IDE, without to install IDE in the container itself
?
The trick is to run your IDE from the container. Your IDE is installed on your host, you just run it in the container.
For this to work, you need an IDE container that has:
all the system requirements your IDE needs
can display GUI applications
has a volume mounted on the location of your IDE on your host
An example of all this with a well known Python IDE instead of vim is discussed here:
Warning: this has been validated on Ubuntu 14.04 only.
PyCharm Docker Integration
Why don't you checkout the official image for python?
https://registry.hub.docker.com/_/python/
It doesn't provide exactly what you're looking for but it supports a workflow where the container is built the same way as it should be run on your development machine (dependencies listed in the "requirements.txt" and downloaded using pip).
Hope this helps.
You may also try using cloud-based IDEs like eclipse che or cloud9.
It has support for docker and runs in a browser.
Update:
I just found out that eclipse che and cloud9 are not mature enough to run java apps, so you might want to try Intellij: https://github.com/marioluan/java-data-structures

How to use Cloud9 with Java and Heroku

I'm currently experimenting with the idea of having a full cloud development environment. I decided to go with Cloud9 IDE and deploy my app on Heroku while using GitHub to store my code. As Java is my most comfortable language, I'm adopting it for my app.
Now the Heroku tutorials use Maven for Java packaging. Is there any way I can replicate this in Cloud9, or can I skip the Maven altogether? Or must I manually put in all the pom files myself?
Note: I do intend to install Toolbelt on my local machine, but there will be times when I want to do coding when I'm not at home and don't have access to the local server. I'm more interested in knowing if it is possible to not have any dependence on a local machine at all.
Not at the moment as Cloud9 lacks build tools for Java. A thing called 'private RunVMs' will be launched in the next couple of weeks that allow you to install a Java build environment from within Cloud9; then deploying to Heroku would be possible for Java apps as well. Keep an eye on the blog for updates.
edit Cloud9 now has private VMs. It should be possible to install a java runtime in Cloud9 if you are on a premium plan now.

deploying a java web project from local mac computer to linux server

I am wondering how I can quickly deploy the java dynamic web project that I built using eclipse on my mac to my Linode linux server? I already have a wordpress website running on the server and have also downloaded tomcat V6 and eclipse. Would I be able to manually copy the source, build and WebContent file contents? I would like to learn best practices for application deployment in the future but this project is very simple and I would like to be able to make it live as soon as possible. If you could also recommend any step by step tutorials I would really appreciate it.
thanks so much
Timnit
You should consider to build a WAR. Eclipse is just an IDE, it helps to develop, not to deploy.
Build your war (you can use maven/ant/build it from eclipse) - whatever you chose.
Once its ready your "deployment task" becomes a matter of moving a single file from MAC to linux server.
Use Cargo. See how easily it can be integrated with Maven build. Here is an excellent blog post.

Categories

Resources