M
M
Maxim Ivanov2017-09-14 10:50:00
linux
Maxim Ivanov, 2017-09-14 10:50:00

How to run several services on one linux machine, but in such a way that each service has a unique ip?

Good afternoon, I have a task and its statement sounds like this:
- there is a machine with Ubuntu Server on board
- on it we raised Upsource, Youtrack, TeamCity, Gitlab
But the inconvenience is that in the internal grid we have to go to one from resources in this way:

http://192.168.137.103:40002 - Upsource
..
http://192.168.137.103:40005 - Gitlab

This is extremely inconvenient, then I decided to read about containerization and try Docker. But for each Upsource container, Youtrack, etc., the delivery included its own java and each image weighed decently and I didn’t want to run such containers either. Why I wanted to try Docker is because, as I understand it, Docker raises an internal grid and all isolated sandboxes have a unique IP and I would like to be able to access each of these IPs on port 80 of each of the running services.
Why do I want to make sure that each service has a unique IP, so that you can hang it on port 80 somehow and then you can register these ip services and names on DNS, and already go to the company's local network on:
http://upsource
..
http://gitlab

What do you suggest, how can this be organized?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
mureevms, 2017-09-14
@splincodewd

Install nginx as a frontend and install at least a hundred services on port 80 on one IP address with access by domain name.

A
Alexander Talalaev, 2017-09-14
@neuotq

It's all right that you wanted to go the opposite way with Docker, I advise you to spend time on it initially, but in the future you will save more than. The fact that each piece comes with its own Java is a trifle, moreover, even a plus, if in the future each of the pieces will have different requirements for it.
In short, I advise you to get confused once, install and configure Docker, raise all the services you need, also raise the Nginx docker, configure the processing of your internal domain names there so that they refer to the desired service, and on the local network either raise your own DNS, or register for each in hosts, match the domain (for example, upsource) and the IP address of your link machine. Well, if it is on the Internet, then it will be easier to do it through subdomains.
In short, the Docker way is absolutely right now and will save you a huge amount of time in the future maintaining and developing your stuff.

F
fdroid, 2017-09-15
@fdroid

Read my questions How to redirect to https when using mod_proxy? and How to redirect a virtual host to a virtual machine? Maybe something will be helpful. In principle, my decision can be extrapolated to your situation, I guess. Well, thoughts out loud - on one machine for each service there is its own virtual machine, the network of which will be configured by a bridge, i.e. will be on the same network with the rest of the machines, incl. physical. And then - my choice.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question