From 9a8ad631e82ce30e1b2f02cf9e00d48e30441564 Mon Sep 17 00:00:00 2001 From: Dmytro Striletskyi Date: Fri, 19 Apr 2019 16:41:17 +0300 Subject: [PATCH] Add instruction to add domain to discovery --- .../user-guide/advanced-guide/domain-name.rst | 17 +++++++++---- .../advanced-guide/node-ssl-cert.rst | 21 +++------------- docs/user-guide/cloud/aws.rst | 22 +++++++++++++--- docs/user-guide/cloud/digital-ocean.rst | 21 +++++++++++++--- docs/user-guide/cloud/vultr.rst | 25 ++++++++++++++----- 5 files changed, 71 insertions(+), 35 deletions(-) diff --git a/docs/user-guide/advanced-guide/domain-name.rst b/docs/user-guide/advanced-guide/domain-name.rst index 0da5fe5e..09bc4a00 100644 --- a/docs/user-guide/advanced-guide/domain-name.rst +++ b/docs/user-guide/advanced-guide/domain-name.rst @@ -112,17 +112,24 @@ change ``157.230.146.230`` to your server's ``IP address``. .. code-block:: console - $ export NODE_IP_ADDRESS=157.230.146.230 $ curl -X POST http://$NODE_IP_ADDRESS/rpc/ -H 'Content-Type: application/json' -d \ '{"jsonrpc":"2.0","id":"11","method":"get_node_config","params":{}}' | python3 -m json.tool -Then change the value of ``NODE_IP_ADDRESS`` to your domain name with an extension (i.e. ``the-coolest-masternode.xyz``) -and send execute the previous command again. A response should be similar to the previous one: +Then create a new environment variable with your domain name with an extension as illustrated below. Also, there is +a command to make your node to be discovered for synchronization by domain name instead of IP address. Change ``the-coolest-masternode.xyz`` +to your ``domain name``. .. code-block:: console - $ export NODE_IP_ADDRESS=the-coolest-masternode.xyz - $ curl -X POST http://$NODE_IP_ADDRESS/rpc/ -H 'Content-Type: application/json' -d \ + $ export DOMAIN=the-coolest-masternode.xyz + $ sudo -i sed -i "s@$NODE_IP_ADDRESS@$DOMAIN@" /home/remme-core-$REMME_CORE_RELEASE/config/network-config.env && \ + echo "DOMAIN=$DOMAIN" >> ~/.bashrc + +Execute the previous command again. A response should be similar to the previous one. + +.. code-block:: console + + $ curl -X POST http://$DOMAIN/rpc/ -H 'Content-Type: application/json' -d \ '{"jsonrpc":"2.0","id":"11","method":"get_node_config","params":{}}' | python3 -m json.tool The flow is illustrated below. diff --git a/docs/user-guide/advanced-guide/node-ssl-cert.rst b/docs/user-guide/advanced-guide/node-ssl-cert.rst index db9de475..de4981e0 100644 --- a/docs/user-guide/advanced-guide/node-ssl-cert.rst +++ b/docs/user-guide/advanced-guide/node-ssl-cert.rst @@ -25,13 +25,6 @@ The flow is illustrated below. :align: center :alt: SSH login to the server -Then create a new environment variable as illustrated below. Change ``the-coolest-masternode.xyz`` -with your ``domain name``. - -.. code-block:: console - - $ export DOMAIN=the-coolest-masternode.xyz - Then create a new environment variable with your ``email`` to receive notifications from ``Let's Encrypt``: .. code-block:: console @@ -42,8 +35,7 @@ Copy the command below and paste into the terminal which will create an ``SSL ce .. code-block:: console - $ echo "DOMAIN=$DOMAIN" >> ~/.bashrc && \ - sudo apt install software-properties-common -y && \ + $ sudo apt install software-properties-common -y && \ sudo add-apt-repository ppa:certbot/certbot -y && \ sudo apt update && sudo apt install certbot python-certbot-nginx -y && \ sudo -i sed -i "s@websitenamewithdomain@$DOMAIN@" /etc/nginx/nginx.conf && \ @@ -279,15 +271,8 @@ Using a brand new terminal window on the local machine transfer the file to the $ scp ~/Desktop/210854864.zip root@157.230.226.218:~ -Then open a terminal window with the server. Then create a new environment variable with your domain name as illustrated below. -Remember to change ``the-coolest-masternode.xyz`` with your ``domain name``. - -.. code-block:: console - - $ export DOMAIN=the-coolest-masternode.xyz - -Copy the command below and paste into the terminal which will create an ``SSL certificate`` and order the web-server to -serve ``https`` connections. +Then open a terminal window with the server. Copy the command below and paste into the terminal which will +create an ``SSL certificate`` and order the web-server to serve ``https`` connections. .. code-block:: console diff --git a/docs/user-guide/cloud/aws.rst b/docs/user-guide/cloud/aws.rst index f41fa105..c4e21e38 100644 --- a/docs/user-guide/cloud/aws.rst +++ b/docs/user-guide/cloud/aws.rst @@ -178,18 +178,34 @@ If you need any assistance connecting to your instance, please see |connection_t Step 5: start the project ========================= -Copy commands below and paste it into the terminal. You can change the value of ``REMME_CORE_RELEASE`` below, just take -a look at our `release list `_. We would recommend the latest version of -the project that already specified in the command below. + +Export environment variable with your server ``IPv4 Public IP`` with the following command. Remember to change +``157.230.146.230`` to your server's ``IPv4 Public IP``. + +.. code-block:: console + + $ export NODE_IP_ADDRESS=157.230.146.230 + +Now, specify the release of the node you want to start. We would recommend the latest version of the project that already +specified in the command below. But you can change the value of ``REMME_CORE_RELEASE``, just take a look at our +`release list `_. .. code-block:: console $ export REMME_CORE_RELEASE=0.8.1-alpha + +After, copy and paste the following commands to the terminal which will install and start your node. + +.. code-block:: console + $ sudo apt-get install apt-transport-https ca-certificates curl software-properties-common make -y && \ + sudo sh -c "echo 'LC_ALL=en_US.UTF-8\nLANG=en_US.UTF-8' >> /etc/environment" && \ echo "REMME_CORE_RELEASE=$REMME_CORE_RELEASE" >> ~/.bashrc && \ + echo "NODE_IP_ADDRESS=NODE_IP_ADDRESS" >> ~/.bashrc && \ cd /home/ && curl -L https://github.com/Remmeauth/remme-core/archive/v$REMME_CORE_RELEASE.tar.gz | sudo tar zx && \ cd remme-core-$REMME_CORE_RELEASE && \ sudo -i sed -i "s@80@3333@" /home/remme-core-$REMME_CORE_RELEASE/docker/compose/admin.yml && \ + sudo -i sed -i "s@127.0.0.1@$NODE_IP_ADDRESS@" /home/remme-core-$REMME_CORE_RELEASE/config/network-config.env && \ sudo -i sed -i '/ - GF_USERS_ALLOW_SIGN_UP=false/a \ - GF_SERVER_ROOT_URL=%(protocol)s:\/\/%(domain)s:\/monitoring\/' /home/remme-core-$REMME_CORE_RELEASE/docker/compose/mon.yml && \ sudo apt update && sudo apt upgrade -y && \ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add && \ diff --git a/docs/user-guide/cloud/digital-ocean.rst b/docs/user-guide/cloud/digital-ocean.rst index fb9c269e..34af5b0c 100644 --- a/docs/user-guide/cloud/digital-ocean.rst +++ b/docs/user-guide/cloud/digital-ocean.rst @@ -178,18 +178,33 @@ The flow is illustrated below. Step 5: start the project ========================= -Copy commands below and paste it into the terminal. You can change the value of ``REMME_CORE_RELEASE`` below, just take -a look at our `release list `_. We would recommend the latest version of -the project that already specified in the command below. +Export environment variable with your server ``IP address`` with the following command. Remember to change +``157.230.146.230`` to your server's ``IP address``. + +.. code-block:: console + + $ export NODE_IP_ADDRESS=157.230.146.230 + +Now, specify the release of the node you want to start. We would recommend the latest version of the project that already +specified in the command below. But you can change the value of ``REMME_CORE_RELEASE``, just take a look at our +`release list `_. .. code-block:: console $ export REMME_CORE_RELEASE=0.8.1-alpha + +After, copy and paste the following commands to the terminal which will install and start your node. + +.. code-block:: console + $ sudo apt-get install apt-transport-https ca-certificates curl software-properties-common make -y && \ + sudo sh -c "echo 'LC_ALL=en_US.UTF-8\nLANG=en_US.UTF-8' >> /etc/environment" && \ echo "REMME_CORE_RELEASE=$REMME_CORE_RELEASE" >> ~/.bashrc && \ + echo "NODE_IP_ADDRESS=NODE_IP_ADDRESS" >> ~/.bashrc && \ cd /home/ && curl -L https://github.com/Remmeauth/remme-core/archive/v$REMME_CORE_RELEASE.tar.gz | sudo tar zx && \ cd remme-core-$REMME_CORE_RELEASE && \ sudo -i sed -i "s@80@3333@" /home/remme-core-$REMME_CORE_RELEASE/docker/compose/admin.yml && \ + sudo -i sed -i "s@127.0.0.1@$NODE_IP_ADDRESS@" /home/remme-core-$REMME_CORE_RELEASE/config/network-config.env && \ sudo -i sed -i '/ - GF_USERS_ALLOW_SIGN_UP=false/a \ - GF_SERVER_ROOT_URL=%(protocol)s:\/\/%(domain)s:\/monitoring\/' /home/remme-core-$REMME_CORE_RELEASE/docker/compose/mon.yml && \ sudo apt update && sudo apt upgrade -y && \ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add && \ diff --git a/docs/user-guide/cloud/vultr.rst b/docs/user-guide/cloud/vultr.rst index 251868f8..0bb4e050 100644 --- a/docs/user-guide/cloud/vultr.rst +++ b/docs/user-guide/cloud/vultr.rst @@ -135,18 +135,33 @@ The flow is illustrated below. Step 4: start the project ========================= -Copy commands below and paste it into the terminal. You can change the value of ``REMME_CORE_RELEASE`` below, just take -a look at our `release list `_. We would recommend the latest version of -the project that already specified in the command below. +Export environment variable with your server ``IP address`` with the following command. Remember to change +``157.230.146.230`` to your server's ``IP address``. + +.. code-block:: console + + $ export NODE_IP_ADDRESS=157.230.146.230 + +Now, specify the release of the node you want to start. We would recommend the latest version of the project that already +specified in the command below. But you can change the value of ``REMME_CORE_RELEASE``, just take a look at our +`release list `_. .. code-block:: console $ export REMME_CORE_RELEASE=0.8.1-alpha + +After, copy and paste the following commands to the terminal which will install and start your node. + +.. code-block:: console + $ sudo apt-get install apt-transport-https ca-certificates curl software-properties-common make -y && \ + sudo sh -c "echo 'LC_ALL=en_US.UTF-8\nLANG=en_US.UTF-8' >> /etc/environment" && \ echo "REMME_CORE_RELEASE=$REMME_CORE_RELEASE" >> ~/.bashrc && \ + echo "NODE_IP_ADDRESS=NODE_IP_ADDRESS" >> ~/.bashrc && \ cd /home/ && curl -L https://github.com/Remmeauth/remme-core/archive/v$REMME_CORE_RELEASE.tar.gz | sudo tar zx && \ cd remme-core-$REMME_CORE_RELEASE && \ sudo -i sed -i "s@80@3333@" /home/remme-core-$REMME_CORE_RELEASE/docker/compose/admin.yml && \ + sudo -i sed -i "s@127.0.0.1@$NODE_IP_ADDRESS@" /home/remme-core-$REMME_CORE_RELEASE/config/network-config.env && \ sudo -i sed -i '/ - GF_USERS_ALLOW_SIGN_UP=false/a \ - GF_SERVER_ROOT_URL=%(protocol)s:\/\/%(domain)s:\/monitoring\/' /home/remme-core-$REMME_CORE_RELEASE/docker/compose/mon.yml && \ sudo apt update && sudo apt upgrade -y && \ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add && \ @@ -189,12 +204,10 @@ When you see the same output as illustrated below, it means the node is ready to :align: center :alt: Proof core is up -To check if your node has completed a correct setup, use the following commands, being logged in your server. Remember to -change ``157.230.146.230`` to your server's ``IP address``. +To check if your node has completed a correct setup, use the following command: .. code-block:: console - $ export NODE_IP_ADDRESS=157.230.146.230 $ curl -X POST http://$NODE_IP_ADDRESS/rpc/ -H 'Content-Type: application/json' -d \ '{"jsonrpc":"2.0","id":"11","method":"get_node_config","params":{}}' | python3 -m json.tool