App Gateway Installation for safous.cn

This article outlines the necessary steps to install the Application Gateway for safous.cn domains. Before you continue to the installation of the App Gateway, please ensure that you have read the prerequisite article and ensure that your system has met the requirements stated in the article.

Generally, the installation of the app gateway can be segmented into these procedural steps:

- Obtaining Token & Installer
- Executing the Installer
- Verification

 


Obtaining Token & Installer:

The first procedure to do is to obtain the installation token and the installer file by conducting these steps:

  1. Login to Safous Admin Portal and navigate to Tenant > Services where you can find the Get Token button. Click on the button.


    Important Note!!
    The Get Token button will be greyed-out once you have already installed the maximum number of App Gateway as stated in the contract.
  2. Once you have clicked the Get Token button, Safous will generate Safous Installation Token needed for the installation of App Gateway and display it on the browser tab.
  3. Connect to your virtual machine/host where you want to install the App Gateway. Please make sure to use a user with root privilege.
  4. Please copy the Safous Installation Token and execute the command below. Replace the <INSTALLATION TOKEN> placeholder with the copied token.
    TOKEN=<INSTALLATION_TOKEN>

    Important Note!!
    The TOKEN is only valid for 24 hours since it has been generated

  5. Download the installer file by executing this command
    curl -s --fail -H "Authorization: Bearer $TOKEN" https://setup.safous.cn/installer -o installer || echo 'Error'



Executing the Installer

After acquiring the installation token and the installer file, the next step is to run the installer. Please follow the steps below in order to successfully install the Application Gateway:

  1. Execute the installer by running this command
    sudo bash installer
  2. Confirm if the domain you intend to use is correct, whether it's the Safous tenant domain (for example, xxx.ztna.safous.cn) or your own domain. If it is correct, press enter; if not, please update it to the appropriate domain.
  3. Next, the installer will get the necessary SSL certificate for your App Gateway 
  4. Once the installation system has obtained the certificate for the App Gateway, the output will vary based on the Safous service domain in use.
    1. If you are using your own domain, proceed to step 5.
    2. If you are using a Safous service domain, you must select an option from those displayed on the screen: 
      • Choose number 1, if the App Gateway is deployed inside of China GIO environment.
      • Choose number 2, if it is deployed outside of China GIO environment.
  5. Enter a one-time password. Note that the password must be strong. The requirements are:
    • At least 8 digits long
    • Have at least 1 upper case letter
    • Have at least 1 lower case letter
    • Have at least 1 symbol
    Once you are done, re-enter the password for confirmation.

    Important Note!!
    Please keep this password safely, as it may be needed for troubleshooting purpose by Safous Support Team.

  6. Enter the name of the site where the App Gateway will be deployed.
    • When deploying an App Gateway for a different site, make sure to use a unique name that differs from the existing ones.
    • Conversely, if you're deploying an App Gateway for the same site to enable HA functionality, it should retain the same name.
  7. The installer will execute a setup process to confirm that all necessary package dependencies are in place for the App Gateway to function properly. 
  8. Subsequently, the installer will continue with the user portal installation. Upon completion, a comprehensive checklist will be available for review at the end of the installation process.

 


Verification

The last procedure to do after the end of installation is to verify that the App Gateway have been installed successfully by conducting these steps:

  • Ensure you are still connected to the App Gateway host
  • Check that the App Gateway containers are running successfully by running this command
    sudo docker ps
  • Run the command down below. Please change the <DOMAIN> placeholder with the domain parameter that you could find in the installation process:
    curl https://login.<DOMAIN>
  • Check the output
    • If the App Gateway is successfully installed, the command will generate an output like the screenshot below:
    • If the App Gateway installation fails or met some problems, the command will generate an output like the screenshots below.
  • If the output resembles the screenshot in the success example, your App Gateway installation is complete. You can now create a new user to log in to the user portal by referring to this article.
  • Should the output resemble the screenshot of the failed example, immediately reach out to support@safous.com for assistance from Safous Support.