First, I don't know anything about deployment.
Here is my application :
I got a rest API backend using Spring Boot with a MongoDB using MongoLab. My frontend is built using React (webpack, cypress).
I have this full application on gitlab in the same repo, with different folders (ie backend, frontend).
Where can I deploy this application? I guess I need to deploy separately those services. If you guys have any advice and give me some tutorials I could follow. What URL can I use like api.example.xx for back and example.xx for the front ?
Any advice is appreciated.
Thank you
Your question is too broad to get a summarised answer. I will give you a few hints that you can expand on.
For starters, since you do not know so much about deployment, I will recommend that you learn with a single machine than with multiple IP addresses. (no Docker, Kubernetes etc. just your applications on different ports)
NOTE: below are the tools you will need to familiarise your self with before this attempt.
linux terminal / GitBash for windows
SSH (communication with your server)
Git (repository managament and versioning)
Github / Bitbucket
Hosting services
Below are a few providers you can use to get you up and running although there are a turn other providers.
Linode hosting services - paid
Amazon Web services - paid/free
Netlify - paid/free
Heroku - free
All these provide you with either a terminal or GUI to deploy/maintain your applications.
Deployment
First, you will need to install all your application dependencies on the server of your choice. i.e. Databases (Mongo for your case) and other applications that support your app. (The same way you did on your local machine)
making sure that your project has the right configurations(passwords, reference URLs, etc.)
See here on How to deploy your spring-boot application
In the meantime, you can try hosting your ReactApp on Netlify and see how it works
As you said you already have it in Gitlab right,And if you want an easy solution and a way out of deploying world then you might want to consider using netlify
it makes deploying as easy as eating a piece of cake, just
Signup
Click on "New site from Git" Button
Select Gitlab in your case
Select the project you want to deploy and for netlify to install
It automatically detects build command and that's all, waits for your permission to build.
Once build is completed you can preview your application(there is a button for that in right corner) and then confirm your deployment.
*Plus it automatically deploys the changes in your git i.e pull requests,
you can choose whatever name you want your website to be(but should be available)
Related
I have a Spring-Boot Application with REST API (Maven build and MongoDB Database). I will also make a UI with Angular 2 on top of that (npm build).
What i would like to do is, to host this site, with its backend & database on a server. Can i do that on my Synology NAS (DS216j)? Or should i better buy a small computer like Raspberry Pi 3?
I have heard somewhere that we can deploy our apps in Docker, and Synology has a docker app or sth? Will this help me reaching my goal? I would like to have a step by step guide from your similar setups.
As far as I understand, you only want to get your app running on your NAS, so using Docker would be an option, but no requirement.
According to the model-specific download page, your DS216j supports Java8.
So what you have to do:
Install Java on your NAS
Package your application as standalone jar-file: If not yet done, you can do that in your pom.xml (see Spring Boot documentation for details; btw, this standalone mode is one of the best features of Spring Boot)
Now you can upload the jar-file
Run it via the command line with java -jar <jar-file-name>.jar
Just make sure that the port of your app does not conflict with the ports used by your NAS.
You could also create a Docker image from your app and run it on your NAS, it seems like your model supports Docker: https://www.synology.com/en-us/dsm/packages/Docker. But that would create some extra effort, but no added value, from my point of view.
We have build java web application which provides various REST API.. I would like to have painless deployment progress.. Here is desired scene..
Users -> Load Balancer -> AS1, AS2, AS3 ...
Here AS = Application Server (Tomcat on EC2) OR Docker instances (I will prefer docker instances)
First time Desired Flow:
Developer fires maven and builds .war file
We may develop script which will generate docker image using this .war file..
Executes steps which will float this dockers behind ELB
Redeployment:
Developer fires maven and builds .war file
We may develop script which will generate docker image using this .war file..
Executes steps which will float this dockers behind ELB and destroy previous one..
I am kind of new to DevOps and may be doing some mistake in above steps. So please feel free to correct me and provide guidance to achieve this goal.
(If this is duplicate please provide link to related question)
Thanks in advance.
I create maven project with dependencies. Than write simple jetty server which return html page on request. Simple "Hello World" application. Now i want relocate it on jelastic cloud, but can't understand how.
When creating cloud on jelastic you can add jetty server, but i need run my own. Maybe i need connect my servlets or another things. Or maybe i can run server.jar file which assembled by maven.
My google traveling failed. I even not imagine what i must search. Pls help me.
Indeed, you can't up your own servers on the native containers. Moreover, such containers don't provide the root access for a customer.
If you want to run your own server you can use either VPS or Docker solution in Jelastic Cloud.
I need to deploy my Java application on Azure Cloud Service. I don't want the extra overhead that comes with managing my own machines using Azure VM, which is an IaaS, nor do I want to use App Service, since the max cores per machine is 4- My application is very compute intensive and I would like to use at least 16 cores per instance, which Azure Cloud Services provides(D5v2 instances).
My build system is Maven and I would like to use something like Codeship to build my .war and deploy it to Azure Cloud services(rather than using the Azure Eclipse SDK to manually Publish to Azure Cloud Services). I've spent hours on the Azure documentation, but haven't found any way of doing this.(Azure App Service has a simple 'upload a war to deploy' model. I dont know why the same isn't there for cloud services: https://azure.microsoft.com/en-in/documentation/articles/web-sites-java-get-started/).
Remember that Cloud Services are the original deployment mechanism for Azure, dating back to 2010 (ok, 2009 if you want to count pre-production days). The .cspkg format is pretty much the same as it ever has been. The Web Apps deployment mechanism is completely different.
Eclipse (on Windows) has a specific plugin available for constructing .cspkg which you can then automate deploying, via PowerShell or CLI.
Alternatively, you can bundle your .war files within a .cspkg generated by Visual Studio, and then get things started within `OnStart(). Again, you can automate deployment from scripts - no need to ever publish directly from within an IDE.
Also: There's nothing stopping you from your automation process pushing .war files to blob storage (or somewhere else) and then sending your app some type of message letting it know to update itself. At that point, there's no redeployment of a .cspkg - rather, it's just downloading a new .war to running web/worker instances and restarting the java process.
#DylanColaco, As #DavidMakogon said, you can install the plugins named azure-tools-for-java for Eclipse or IntelliJ IDEA to deploy your war file as web/worker role instance into cloud service.
And there is an offical tutorial which shows how to getstarted.
As references, you can refer to the article lists and a very helpful vedio at Channel 9 below.
For Eclipse, https://azure.microsoft.com/en-us/documentation/articles/azure-toolkit-for-eclipse/
For IntelliJ, https://azure.microsoft.com/en-us/documentation/articles/azure-toolkit-for-intellij/
Java Applications in Windows Azure Cloud Services using Eclipse
I have built a java web application on Eclipse. But i am naive in terms of making an application live i.e. deploy it online. I have tried using Cloudbees, and succeeded in deploying it at run#cloud there, but could not see it actually running. I haven't purchased any domain name as of now, therefore I would like to try it on any free domain first. If I want to make that application live, what would be the exact steps that I'll have to follow ?
Use Redhat Openshift Cloud...
Redhat Openshift is a Cloud based service which provide PAAS(Platform As A Service) i.e. Use their Server and upload our Project.
Redhat Openshift also provides MySql , Postgre and MongoDB.
It Easy to understand, Simple to Configure and Auto-Scalable.
Redhat Openshift supports:
https://dl.dropbox.com/u/24576260/Redhat%20Support.png
There are alternatives of Redhat Openshift - Google App Engine (GAE). But GAE restrict some of the class usages in Trial Verison.
Whereas Openshift have kept open and whatever user wants he can use and configure it.
Try Jelastic.
They have a free trial as well.
PS: Works for me each time.
If you have deployed successfully to RUN#cloud then your app is already running; there is no need to purchase a custom domain. If you log in to https://grandcentral.cloudbees.com/ and click on the Apps tab, you should see your new application listed; the show in new window link will open the live web page. (This will be http://appid.accountid.cloudbees.net/ where appid is whatever you chose when creating the app, and accountid is rishabh85 or whatever your CloudBees login name is.)
You can also load this page directly from Eclipse, if using the CloudBees SDK (use http://eclipse.cloudbees.com/ to download or http://blog.cloudbees.com/2012/07/getting-started-with-cloudbees-and.html for more information). Configure your account information, and open the CloudBees view (available from the CloudBees toolbar button), and you will see your running apps. A context menu item lets you open the selected app live in a web browser.
Try Google app engine. You can deploy your Web applications and you ll get a free sub domain.
As I have small knowledge of working like this, its very easy. This is to inform you that its works like your own pc. In my last company they had a Windows server.. and Tomcat & MySQL was pre installed on that server. I just place my .war in the proper place & imported the blank DB.. and its starts working :)
Checkout my blog posts on creating a web service from scratch using Cloudbees. It's a series of 7 posts that have everything you need in order to get your service up and running (including an opensource code base with almost everything you need already integrated)
If you just want the fastest way, checkout this youtube video.