Describes how to set up the iota test environment used by developers and testers.
Warning
You MUST complete the steps in Create Build Environment and build the iota components using the instructions in Build Source before you create the test environment.
Prerequisites
The following prerequisites need to be met in order to create a functional iota Test Environment.
Passwordless ssh
Do the following to check whether you have passwordless SSH setup correctly.
ssh localhost Last login: Fri Nov 6 22:44:00 2015 from 192.168.1.9
If the ssh localhost
command prompts for a password, then passwordless ssh
is not set up correctly. The following examples set up passwordless ssh
using id_rsa
keys. You can choose the method that best represents your environment.
If the ssh localhost
command prompts for a passphrase, then you need to run an ssh-agent. (See below.)
If you already have an existing set of ssh keys
Simply copy both the id_rsa.pub
and id_rsa
to your ~/.ssh
directory.c. Then, do the following to modify your ssh
environment.
ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys chmod 600 ~/.ssh/id_rsa echo "NoHostAuthenticationForLocalhost=yes" >>~/.ssh/config chmod go-w ~/.ssh/config chmod 755 ~/.ssh; chmod 640 ~/.ssh/authorized_keys;
If you need to create your keys first
Do the following:
rm -rf ~/.ssh ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys chmod 600 ~/.ssh/id_rsa.pub echo "NoHostAuthenticationForLocalhost=yes" >>~/.ssh/config chmod go-w ~/.ssh/config chmod 755 ~/.ssh; chmod 640 ~/.ssh/authorized_keys;
Start a ssh agent
$ eval $(ssh-agent) Agent pid 22167 $ ssh-agent Enter passphrase for /home/centos/.ssh/id_rsa: Identity added: /home/centos/.ssh/id_rsa (/home/centos/.ssh/id_rsa) $ ssh localhost Last login: Thu Jan 26 06:07:55 2017 from ::1 $ exit $
System Limits
Please check that the system limits in your environment are appropriate for Apache iota. If they are not, then you will need to increase the limits or iota cannot start.
Use the following command to check your system limits:
ulimit -a
The recommended settings are as follows:
<TBD<
To change your limits settings, you typically edit /etc/security/limits.conf and reboot the server.
# Changes added for the iota Test Environment * - core 1000000 * - nproc 267263 * - nofile 32000 * - sigpending 515196 * - memlock 49595556 * - stack 10240
TIP
Some CentOS/RedHat versions define nproc limits in /etc/security/limits.d/90-nproc.conf, too. If so, you can simply delete this file before rebooting the server.
Verify Network Setup
The FQDN network configuration is located in /etc/hosts
while name resolution is configured using /etc/resolv.conf
.
Find FQDN
The hostname
utility allows you to find the short name as well as the FQDN for your server.
$ # Get current hostname $ hostname box01 $ # Get fully-qualified domain name for server $ hostname --fqdn box01.iota.org $
Test FQDN
The ssh
utility allows you to test whether the configured correctly.
$ ssh box01.iota.org # Command hangs, ctrl-c to break $
Modify FQDN Resolution
NOTE
Some of the steps in this subsection requires root access to change configurations and run utilities.
Name resolution is performed per the configuration in /etc/resolv.conf
while /etc/hosts
configures the FQDN.
$ # Check FQDN resolution (fail example) $ host -T Host box01.iota.org not found: 5(REFUSED) # Examine issue $ cat /etc/resolv.conf # Generated by NetworkManager nameserver 192.168.1.1 $ cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 10.0.2.15 box01.iota.org box01
In this example, the name server is in a different domain than box01.iota.org.
$ # Check interface configuration $ sudo ifconfig eth3 Link encap:Ethernet HWaddr 08:00:27:D0:B7:40 inet6 addr: fe80::a00:27ff:fed0:b740/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1703 errors:0 dropped:0 overruns:0 frame:0 TX packets:3778 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:195684 (191.0 KiB) TX bytes:1290492 (1.2 MiB) eth4 Link encap:Ethernet HWaddr 08:00:27:A5:29:28 inet addr:192.168.1.12 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::a00:27ff:fea5:2928/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:282605 errors:0 dropped:0 overruns:0 frame:0 TX packets:148931 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:290384816 (276.9 MiB) TX bytes:18066069 (17.2 MiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:263 errors:0 dropped:0 overruns:0 frame:0 TX packets:263 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:41810 (40.8 KiB) TX bytes:41810 (40.8 KiB)
The server is running on an192.168.1.x
network. Therefore, this example shows an issue with the/etc/hosts
configuration. Correct the setting as root editing the /etc/hosts. In this example, the eth4 address is 192.168.1.12 yielding the following result.
$ cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.1.12 box01.iota.org box01 $ ssh box01.iota.org The authenticity of host 'box01.iota.org (192.168.1.12)' can't be established. RSA key fingerprint is 88:f7:90:fe:35:76:10:92:cf:6d:c4:60:ca:b9:43:9f. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'box01.iota.org,192.168.1.12' (RSA) to the list of known hosts. Last login: Tue Jan 26 13:41:58 2016 from localhost $ exit $ ssh box01 The authenticity of host 'box01 (192.168.1.12)' can't be established. RSA key fingerprint is 88:f7:90:fe:35:76:10:92:cf:6d:c4:60:ca:b9:43:9f. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'box01' (RSA) to the list of known hosts. Last login: Tue Jan 26 14:07:09 2016 from box01.iota.org $ exit $
Repeat for each server in your environment to ensure proper FQDN resolution before installing Hadoop.
Install iota
<TBD>
Next Steps
At this point, you should have a running iota Test Environment. The following chapters provide additional guidance for how to use the iota Test Environment:
Test: Describes the iota test libraries.
Manage Test Environment: Describes how to manage the test environment including tasks such as starting/stopping iota components.
In addition, you can now install iota client software and use the product as an end user would. Refer to the iota documentation for details.