Community Blog How to Install Rudder on Alibaba Cloud

How to Install Rudder on Alibaba Cloud

In this tutorial, you will learn how to install Java Oracle JDK and set up Rudder on Alibaba Cloud.

By Sajid Qureshi, Alibaba Community Blog author

In this tutorial, we're going to be installing Rudder on Alibaba Cloud. Rudder is an open-source, multi-platform solution for managing configurations. Put more simply, it is a web-based audit and configuration management tool that helps you achieve automation in terms of system configuration for your production IT infrastructure. It is written in Scala and C, and it is a multi-platform solution and also relatively lightweight.

Rudder has built-in rules to perform low-level configuration patterns like confirm and ensure file content and packages are installed. Rudder also comes with several other features, some of which are listed here:

  1. Automatic host inventory
  2. Feature-complete web interface
  3. Standardized, reusable policies
  4. Custom policy editor
  5. Central reporting and historical information for policy applied to hosts
  6. Grouping based on search queries run against inventory
  7. Dynamic generation of per-host policies.


For this tutorial, you'll need the following items:

  1. You must have an Alibaba Cloud Elastic Compute Service (ECS) instance activated and have verified a valid payment method. If you are a new user, you can get a free account. If you don't know about how to set up your ECS instance, you can refer to this tutorial or this quick-start guide. Note that your ECS instance must have at least 1GB RAM and 1 Core processor.
  2. A domain name registered from Alibaba Cloud. If you have already registered a domain from Alibaba Cloud or any other host, you can update its domain nameserver records.
  3. A root user.

Update the System

For this tutorial, it's recommended that you upgrade and update all of the available packages and repositories before installing any new package. To do this, run the yum -y update command.

Install Java

As the first part of the main steps of this tutorial, you will need to install Java RE version 8 or later, as it is required to install Rudder on your Alibaba Cloud instance. So, let's install Java, then we will proceed to install Rudder. You can get the Java Oracle JDK 11 by running the following command.

curl -O https://download.java.net/java/GA/jdk11/13/GPL/openjdk-11.0.1_linux-x64_bin.tar.gz

Once downloaded, you'll want to extract the downloaded package using the tar zxvf openjdk-11.0.1_linux-x64_bin.tar.gz command. After which, you'll need to move it to a different location for backup using the mv jdk-11* /usr/local/ command. Then, once Java is installed, you will need to set it as the default Java configuration. You can do so using the alternatives --config java command. If, in case, there is multiple Java configurations installed on your system, you'll need to select the latest Java JDK 11.

There are 2 programs which provide 'java'.

  Selection    Command
*+ 1           java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-
   **2           /usr/jdk-11.0.1/bin/java**

Enter to keep the current selection[+], or type selection number: 2

You can check and verify this installation by checking Java version on your system using the java -version command. If nothing goes wrong, then you should see the following output in your terminal.

java version "11.0.1" 2018-10-16 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.1+13-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.1+13-LTS, mixed mode)

Now, you should have installed Java on your server, but you will still need to set up Java environment variables before using it otherwise it won't work properly. In order to do so, you will need to create a file using any text editor. In this tutorial, you'll be using the nano text editor. You can also install it using the yum -y install nano command. In particular, by entering the following:

nano /etc/profile.d/javajdk.sh

You'll also need to add the following variables into the file:

export JAVA_HOME=/usr/local/jdk-11.0.1  
export PATH=$PATH:$JAVA_HOME/bin

Then, save the file and exit from the text editor. After that, run the source /etc/profile.d/javajdk.sh command to load up the environments and apply changes.

Install Rudder

Now that you have installed and configured all the dependencies required to install Rudder, you are ready to download and install Rudder on Alibaba Cloud instance. To do this, the first thing you'll need to do is import Rudder key into rpm using the following command.

rpm --import https://repository.rudder.io/rpm/rudder_rpm_key.pub

Next, you will need to add the Rudder repository to your system. To do this, simply, copy and paste the following content in your terminal.

echo '[Rudder_5.0]
name=Rudder 5.0
gpgkey=https://repository.rudder.io/rpm/rudder_rpm_key.pub' > /etc/yum.repos.d/rudder.repo

Once the Rudder repository is added to your system, it will be very easy to install the Rudder server. Run the yum -y install rudder-server-root command to install it. This command will install the rudder server and also automatically install all the required components as well. After the installation is complete, you will need to modify firewall rules to open ports used by Rudder server. To do this, run the following command:

firewall-cmd --permanent --zone=public --add-port=443/tcp

Next, you'll need to reload firewall rules to apply these changes. For this, you can run the firewall-cmd --reload command. Then, given that the Rudder server is installed on your CentOS 7 server, you will then need to configure it to work properly. You can do so by running its official initialization script using the /opt/rudder/bin/rudder-init command. When you do this, you'll be asked to provide the network address that you want to access the server. So, enter your network details manually and click the ENTER button to continue. Next, you'll be prompted to add more networks. So, if you want to add more networks, then type Yes and continue otherwise type No to finish this script.

Web Interface

Now, we're up to the web interface piece of this tutorial. For this part of the tutorial, you'll want to follow these steps.

First, open up your favorite web browser to go to access your Rudder server by visiting http://YourServerIP or http://YourDomain.com. Naturally, you'll need to change these addresses to your actual name.

You'll be prompted to do a Rudder login with a screen like the one below:


Enter admin as both the username and password, and then click on Sign In button to proceed further. On the next page, you should see a Rudder dashboard. You can manage your nodes, rudder agent, and, rudder server from this dashboard.



In this tutorial, you have learned to install Java Oracle JDK on Alibaba Cloud. You also learned to install and configure Rudder on Alibaba Cloud. We hope now you have enough knowledge to work with Rudder.

0 0 0
Share on

Alibaba Clouder

2,624 posts | 720 followers

You may also like


Alibaba Clouder

2,624 posts | 720 followers

Related Products