You are on page 1of 11

1.

Hardnode should be prepared according to Hardware requirements http://ops-


docs.jelastic.com/hardware-requirements, and CentOS 6 should be pre-installed.

2. Put local public SSH key to authorized keys section on hardnode.

3. Download and unpack PCS-deployer. http://dot.jelastic.com/download/pcs/pcs-


deployer_6cbc9133938b9300de318006d363d129819bea93.tar.gz

4. Enter directory ../pcs-deployer and run script with appropriate parameters.


./pcs-deployer.sh <hardnode hostname> root@<hardnode public IP> -i
~/.ssh/id_rsa
Hardnode will reboot itself twice.

5. Activate VZ license (get activation code from Jelastic team).


vzlicupdate -a <license activate code>

6. Install PVA agent.


cd /tmp
wget http://download.pa.parallels.com/pva/pva-setup-deploy.x86_64
chmod a+x pva-setup-deploy.x86_64
mkdir /root/pva_install
./pva-setup-deploy.x86_64 -d /root/pva_install --extract
cd /root/pva_install
./pva-setup --install
/etc/init.d/pvaagentd restart
/etc/init.d/pvapp restart

7. Ensure that iptables nat table exist.


[root@localhost ~]# iptables -L -n -t nat
Chain PREROUTING (policy ACCEPT)
target prot opt source destination

Chain POSTROUTING (policy ACCEPT)


target prot opt source destination

Chain OUTPUT (policy ACCEPT)


target prot opt source destination

In case the first output cannot be displayed, and you see the following:

[root@localhost ~]# iptables -L -n -t nat


iptables v1.4.7: can't initialize iptables table `nat': Table does not exist
(do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

you need to perform the following actions:


1. execute command
sed -i "s/ip_conntrack_disable_ve0=1/ip_conntrack_disable_ve0=0/"
/etc/modprobe.d/parallels.conf
2. reboot hardnode;
3. check iptables nat table again.

8. Create NAT rules for all internal networks (hardnode internal networks, internal
network for containers, internal network for infra containers etc.).
Example:
INTERNAL_NETWORKS=(10.100.0.0/16 172.20.0.0/16)
EXT_INTERFACE=eth0

iptables -N INTERNAL -t nat


for i in ${INTERNAL_NETWORKS[@]}
do
iptables -t nat -A INTERNAL -d $i -j ACCEPT
done
iptables -t nat -A INTERNAL -o $EXT_INTERFACE -j MASQUERADE

iptables -t nat -I POSTROUTING 1 -o venet0 -j ACCEPT


for i in ${INTERNAL_NETWORKS[@]}
do
iptables -t nat -I POSTROUTING 1 -s $i -j INTERNAL
done
/etc/init.d/iptables save

9. Delete vznet bridges.


for i in $(vznetcfg net list | grep -v "Network ID" | awk '{print $1}'); do
vznetcfg net del $i; done

10. Set data and time sync.


yum install ntp -y
chkconfig ntpd on
rm -f /etc/localtime
ln -s /usr/share/zoneinfo/UTC /etc/localtime
ntpdate pool.ntp.org
/etc/init.d/ntpd start

10a. Ensure that sshd is configured for use password authentication and root login
enabled.
PasswordAuthentication yes
PermitRootLogin yes
11. Open JCA, navigate to Regions, and add test hardnode group:
Unique name - unique name of hn group;
Display name - displayed name on dashboard of hn group;
Region - region where you are going to add new hardnode to.

12. Navigate to Hardware nodes, click on Add:

Fill out the form, where:


Host - hostname visible in JCA;
IP address - usually internal IP address of hardnode;
Status - set to MAINTENANCE;
Hardnode Group - hardnode group created in point 11;
Login - SSH user. It has to contain uid 0 and group id 0. Usually it is root;
Password/Confirm Password - SSH password for user defined in Login field.
Change only SSH port to proper value if required.
Choose PCS as Virtualization product.

Then click on Add button in order to reflect the changes.

Possible exception
(Error: Could not connect to the hardware node. Check SOAP credentials ).
If you get exception presented below, take the following steps:
a. check SSH connection from 103 container to hardnode using provided IP, SSH
port and credentials;
b. check TCP connecton from 103 container to hardnode IP, port 8080 (use telnet,
for example):

[root@localhost ~]# telnet 192.168.1.1 8080


Trying 192.168.1.1...
Connected to 192.168.1.1.
Escape character is '^]'.
13. Look to /var/log/install_pcs.log on hardnode for details.

14. After completion of the process in JCA, you need to wait for 5-7 minutes until jelastic
will finish the configuration.
Hardnode text font: black (in case red font is reflected, configuration mistakes must be
considered) All tests must have the OK status in Status tab of JCA.
15. Enable test hardnode group in Regions & Pricing tab for Beta user group:
16. Go to System settings > User interface, and enable ENV_REGIONS_PANEL and
ENV_REGIONS_SELECTOR

17. Check the new hardnode.


A. Log in to dashboard using Beta account, and create simple environment (eg.
Tomcat7) in test hardnode group.
B. Open environment in browser.
C. Create another environment with external IP.
D. Ensure it opens in browser.

18. If your testing activities were completed with success, move node to production
hardnode group:
19. Disable ENV_REGIONS_PANEL and ENV_REGIONS_SELECTOR in System settings >
User interface if required.

In case of emergency, contact Jelastic Support team.

You might also like