SyntropyStack —UI — Nginx and curl client — Part 1

In this tutorial, we will interconnect two Vm through syntropystack in order to execute a CURL command from the VM1 Cloud to the Nginx VM2 server.

Start Syntropy Agent with Docker

sudo docker run --network="host" --restart=on-failure:10 --cap-add=NET_ADMIN --cap-add=SYS_MODULE \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
--device /dev/net/tun:/dev/net/tun --name=syntropynet-agent \
-e SYNTROPY_API_KEY=CHANGE ME \
-e SYNTROPY_TAGS=CHANGE ME \
-e SYNTROPY_PROVIDER=CHANGE ME \
-e SYNTROPY_AGENT_NAME=CHANGE ME \
-e SYNTROPY_NETWORK_API='docker' \
-d syntropynet/agent:stable

Build 2x VM

  • First VM: Nginx You can’t use -p flag
  • Second VM: Cloud1 with commande CURL

Here are some explanations for each service:

  • Nginx: is a web server which can also be used as a reverse proxy, load balancer, mail proxy and HTTP cache. The software was created by Igor Sysoev and first publicly released in 2004.
  • Curl: is an online command interface, designed to retrieve the contents of a resource accessible through a computer network.

The VM of different vendors register on the SyntropyStack interface thanks to the agent launched by Docker.

Create your Network SyntropyStack

Innovation is to be able to connect these VMs with one click. An encrypted Tunnel is then built. In order for services to communicate with each other, they must be linked together:

CURL Command

When we launch the CURL command to the Nginx server, we will get this

curl http://nginx_docker_ip<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>
<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>
<p><em>Thank you for using nginx.</em></p>
</body>
</html>

Congratulations, your architecture is up and running ;-)

In conclusion, we were able to demonstrate that we were able to interrogate a Nginx server without going through the internet.

Video tutorial

GitHub Tutorial

syntropy-devops-integrations/nginx-and-curl-client at main · SyntropyNet/syntropy-devops-integrations (github.com)

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store