Configuring an APC AP7900 and Anvil-configure-host: Difference between pages

From Alteeve Wiki
(Difference between pages)
Jump to navigation Jump to search
 
Created page with "{{man_header}} = NAME = anvil-configure-host - This program configures the host for use in an Anvil! cluster. = SYNOPSIS = '''anvil-configure-host''' ''<command> ''[''options''] = DESCRIPTION = This picks up a job from the database and, using the data from it, configures the host to prepare it for use in an Anvil! cluster. = OPTIONS = ;-?, -h, '''--help''' : Show this man page. ; '''--log-secure''' : When logging, record sensitive data, like passwords. ; -v..."
 
Line 1: Line 1:
{{howto_header}}
{{man_header}}


[[image:APC_AP7900_Front-Right.jpg|thumb|right|400px|APC [http://www.apc.com/products/resource/include/techspec_index.cfm?base_sku=AP7900 AP7900 8-Outlet 1U] 120vAC PDU. Photo by [http://www.apcmedia.com/prod_image_library/index.cfm?search_item=AP7900# APC].]]
= NAME =


= Purpose of This Tutorial =
anvil-configure-host - This program configures the host for use in an Anvil! cluster.


The APC-brand [[AP7900]] switched [[PDU]] is an excellent [[AN!Cluster_Tutorial_2#Why_Switched_PDUs.3F|backup fence device]]. All ''[[Anvil!]]'' systems we build use a pair of them.
= SYNOPSIS =


This mini-tutorial covers how to configure them with an IP address.
'''anvil-configure-host''' ''&lt;command&gt; ''[''options'']


That is all you need to do for them to start working!
= DESCRIPTION =


We run them on our [[VLAN]] isolated [[AN!Cluster_Tutorial_2#Subnets|subnet]] which how no access to the normal internal network, nor does it have access to the Internet. Thanks to this, we can safely run them without authentication over [[SNMP]] queries.
This picks up a job from the database and, using the data from it, configures the host to prepare it for use in an Anvil! cluster.


If you want to know more about the AP7900 than we cover here, you view view the entire manual at the link below:
= OPTIONS =


* [http://www.apcmedia.com/salestools/ASTE-6Z6KAM/ASTE-6Z6KAM_R0_EN.pdf APC Switched Rack Power Distribution Unit - Installation Guide]
;-?, -h, '''--help'''
: Show this man page.
; '''--log-secure'''
: When logging, record sensitive data, like passwords.
; -v, -vv, -vvv
: Set the log level to 1, 2 or 3 respectively. Be aware that level 3 generates a significant amount of log data.


{{warning|1=If you need to put the PDUs onto a public network, be sure to enable SNMP authentication!}}
== Commands: ==


= Serial Access =
;'''--job-uuid''' &lt;name&gt;
: The program is normally run as a job, with data on how to configure the host defined in the job. This switch allows the running of a specific job. If this is not set, the program will search for a job that has not yet been picked up by another process. If found, that job UUID is used automatically.


[[image:Antaira_UTS-1110A_Top.jpg|thumb|right|400px|Antaira [http://www.antaira.com/products/industrial-usb/usb-to-serial/1-port/uts-1110a?pid=4509 UTS-1110A] single-port USB to RS-232] serial adapter. Photo by [http://shopping.netsuite.com/c.685553/site/images/Products/full/uts-1110a_1.jpg Antaira].]]
= AUTHOR =


By default, the APC AP7900 does not have an IP address assigned.
Written by Madison Kelly, Alteeve staff and the Anvil! project contributors.


The easiest way to configure an IP address is to log into the PDU over a [https://en.wikipedia.org/wiki/Serial_port serial] port. Most servers still come with a built-in 9-pin serial port, but most desktops and laptops do not. If you don't have one, many vendors sell USB to serial adapters. The one we've used quite successfully is the [http://www.antaira.com/products/industrial-usb/usb-to-serial/1-port/uts-1110a?pid=4509 Antaira UTS-1110A], but almost any adapter you can find at your local computer store will work.
= REPORTING BUGS =


{{note|1=The [[Build an m2 Anvil! - Detailed|m2 ''Anvil!'']] installs <span class="code">screen</span> on both nodes and ''Striker'' dashboards.}}
Report bugs to users@clusterlabs.org
 
We're going to use a program called <span class="code">[http://www.gnu.org/software/screen/ screen]</span> to talk to the PDU over the serial port.
 
To do this, you need to know what device the PDU's serial cable is plugged into. Some common ones:
 
{|class="wikitable"
!Type
!Device path
|-
|Serial port 1
|class="code"|/dev/ttyS0
|-
|Serial port 2
|class="code"|/dev/ttyS1
|-
|USB-Connected port 1
|class="code"|/dev/ttyUSB0
|-
|USB-Connected port 2
|class="code"|/dev/ttyUSB1
|}
 
... and so on.
 
In my case, I'm using the port on a USB to Serial adapter, so I will use '<span class="code">/dev/ttyUSB0</span>'.
 
Knowing this, we're ready to go!
 
Open a terminal window and run:
 
<syntaxhighlight lang="bash">
screen /dev/ttyUSB0
</syntaxhighlight>
 
{{note|1=When you are done, to exit <span class="code">screen</span>, press '<span class="code"><ctrl></span>' + '<span class="code">a</span>', release, then press '<span class="code">k</span>'. You will be prompted to kill the session, type '<span class="code">y</span>'.}}
 
The screen will be blank at first. Press '<span class="code"><enter></span>' a couple of times and the AP7900 login prompt should appear.
 
<syntaxhighlight lang="text">
User Name :   
</syntaxhighlight>
 
{{note|1=If you make a mistake and nothing happens when you press '<span class="code"><Backspace></span>', try pressing '<span class="code">ctrl</span>' + '<span class="code">h</span>' instead.}}
 
The default user name is '<span class="code">apc</span>' and the default password is '<span class="code">apc</span>' as well.
 
<syntaxhighlight lang="text">
User Name : apc
Password  : ***
</syntaxhighlight>
 
You will see a summary page.
 
<syntaxhighlight lang="text">
American Power Conversion              Network Management Card AOS      v3.7.4
(c) Copyright 2009 All Rights Reserved  Rack PDU APP                    v3.7.4
-------------------------------------------------------------------------------
Name      : RackPDU                                  Date : 05/23/2000
Contact  : Unknown                                  Time : 20:44:16
Location  : Unknown                                  User : Administrator
Up Time  : 3 Days 3 Hours 1 Minute                  Stat : P+ N? A+
 
Switched Rack PDU: Communication Established
 
------- Control Console -------------------------------------------------------
 
    1- Device Manager
    2- Network
    3- System
    4- Logout
 
    <ESC>- Main Menu, <ENTER>- Refresh, <CTRL-L>- Event Log
>
</syntaxhighlight>
 
Press '<span class="code">2</span>' to go into the "<span class="code">Network</span>" sub-menu.
 
<syntaxhighlight lang="text">
> 2
</syntaxhighlight>
<syntaxhighlight lang="text">
------- Network ---------------------------------------------------------------
 
    1- TCP/IP
    2- DNS
    3- Ping Utility
    4- FTP Server
    5- Telnet/SSH
    6- Web/SSL/TLS
    7- Email
    8- SNMP
    9- Syslog
    10- ISX Protocol
 
    <ESC>- Back, <ENTER>- Refresh, <CTRL-L>- Event Log
>
</syntaxhighlight>
 
Press the '<span class="code">1</span>' key to go into the "<span class="code">TCP/IP</span>" menu.
 
<syntaxhighlight lang="text">
> 1
</syntaxhighlight>
<syntaxhighlight lang="text">
------- TCP/IP ----------------------------------------------------------------
 
        Network not started. Currently making a BOOTP request...
        -----------------------------------------------------------------------
        MAC Address : 00 C0 B7 88 CC 1E
 
    1- Boot Mode  : DHCP & BOOTP
    2- Advanced...
 
    <ESC>- Back, <ENTER>- Refresh, <CTRL-L>- Event Log
>
</syntaxhighlight>
 
First we need to change the "<span class="code">Boot Mode</span>" to "<span class="code">Manual</span>", so press '<span class="code">1</span>'.
 
<syntaxhighlight lang="text">
> 1
</syntaxhighlight>
<syntaxhighlight lang="text">
------- Boot Mode -------------------------------------------------------------
 
    1- DHCP & BOOTP
    2- DHCP only
    3- BOOTP only
    4- Manual
 
    <ESC>- Back, <ENTER>- Refresh
</syntaxhighlight>
 
Press '<span class="code">4</span>' to select the "<span class="code">Manual</span>" option.
 
<syntaxhighlight lang="text">
> 4
</syntaxhighlight>
<syntaxhighlight lang="text">
------- TCP/IP ----------------------------------------------------------------
 
        Network not started. Currently making a BOOTP request...
        -----------------------------------------------------------------------
        MAC Address : 00 C0 B7 88 CC 1E
 
        * Changes will take effect on logout.
 
    1- System IP      : 0.0.0.0
    2- Subnet Mask    : 0.0.0.0
    3- Default Gateway: 0.0.0.0
    4- Boot Mode      : Manual
    5- Advanced...
 
    <ESC>- Back, <ENTER>- Refresh, <CTRL-L>- Event Log
>
</syntaxhighlight>
 
Now we're ready to set the IP address.
 
In [[AN!Cluster_Tutorial_2#Subnets|most ''Anvil!'' systems]], the switched PDUs have the IP address of '<span class="code">10.20.2.x/255.255.0.0</span>'.
 
This is the convention we're going to use here. This is our first PDU, so we'll set:
 
{|class="wikitable"
|-
|class="code"|System IP
|class="code"|10.20.2.1
|-
|class="code"|Subnet Mask
|class="code"|255.255.0.0
|-
|class="code"|Default Gateway
|class="code"|10.20.255.254
|}
 
There is no outside network access on the [[Back-Channel Network]], so it may not seem like it makes sense to set the "<span class="code">Default Gateway</span>". The problem is that the PDU requires a gateway be set, so we give it a fake, unused address. Often, when there is a router on a network, it takes the top of bottom IP address in the subnet. We're using the top IP address as the dummy gateway here.
 
So back to it!
 
Press '<span class="code">1</span>' to set the IP.
 
<syntaxhighlight lang="text">
> 1
</syntaxhighlight>
<syntaxhighlight lang="text">
System IP : 10.20.2.1
</syntaxhighlight>
<syntaxhighlight lang="text">
------- TCP/IP ----------------------------------------------------------------
 
        Network not started. IP, Subnet, Gateway must be configured.
        -----------------------------------------------------------------------
        MAC Address : 00 C0 B7 88 CC 1E
 
        * Changes will take effect on logout.
 
    1- System IP      : 10.20.2.1
    2- Subnet Mask    : 0.0.0.0
    3- Default Gateway: 0.0.0.0
    4- Boot Mode      : Manual
    5- Advanced...
 
    <ESC>- Back, <ENTER>- Refresh, <CTRL-L>- Event Log
>
</syntaxhighlight>
 
Now press '<span class="code">2</span>' to set the "<span class="code">Subnet Mask</span>".
 
<syntaxhighlight lang="text">
> 2
</syntaxhighlight>
<syntaxhighlight lang="text">
Subnet Mask : 255.255.0.0
</syntaxhighlight>
<syntaxhighlight lang="text">
------- TCP/IP ----------------------------------------------------------------
 
        Network not started. IP, Subnet, Gateway must be configured.
        -----------------------------------------------------------------------
        MAC Address : 00 C0 B7 88 CC 1E
 
        * Changes will take effect on logout.
 
    1- System IP      : 10.20.2.1
    2- Subnet Mask    : 255.255.0.0
    3- Default Gateway: 0.0.0.0
    4- Boot Mode      : Manual
    5- Advanced...
 
    <ESC>- Back, <ENTER>- Refresh, <CTRL-L>- Event Log
>
</syntaxhighlight>
 
Now press '<span class="code">3</span>' to set the dummy "<span class="code">Default Gateway</span>" address.
 
<syntaxhighlight lang="text">
> 3
</syntaxhighlight>
<syntaxhighlight lang="text">
Default Gateway : 10.20.255.254
 
------- TCP/IP ----------------------------------------------------------------
 
        Network not started. Currently making a DHCP request...
        -----------------------------------------------------------------------
        MAC Address : 00 C0 B7 88 CC 1E
 
        * A cookie is required in the vendor options to accept a DHCP offer.
        * Changes will take effect on logout.
 
    1- System IP      : 10.20.2.1
    2- Subnet Mask    : 255.255.0.0
    3- Default Gateway: 10.20.255.254
    4- Boot Mode      : Manual
    5- Advanced...
 
    <ESC>- Back, <ENTER>- Refresh, <CTRL-L>- Event Log
>
</syntaxhighlight>
 
{{note|1=The changes won't take effect until we log out.}}
 
Press '<span class="code"><esc></span>' to go back to the main menu.
 
<syntaxhighlight lang="text">
<esc>
</syntaxhighlight>
<syntaxhighlight lang="text">
------- Network ---------------------------------------------------------------
 
    1- TCP/IP
    2- DNS
    3- Ping Utility
    4- FTP Server
    5- Telnet/SSH
    6- Web/SSL/TLS
    7- Email
    8- SNMP
    9- Syslog
    10- ISX Protocol
 
    <ESC>- Back, <ENTER>- Refresh, <CTRL-L>- Event Log
</syntaxhighlight>
 
Press '<span class="code"><esc></span>' again.
 
<syntaxhighlight lang="text">
<esc>
</syntaxhighlight>
<syntaxhighlight lang="text">
------- Control Console -------------------------------------------------------
 
    1- Device Manager
    2- Network
    3- System
    4- Logout
 
    <ESC>- Main Menu, <ENTER>- Refresh, <CTRL-L>- Event Log
>
</syntaxhighlight>
 
Lastly, press '<span class="code">4</span>' to log out.
 
<syntaxhighlight lang="text">
> 4
</syntaxhighlight>
<syntaxhighlight lang="text">
Logging out.
</syntaxhighlight>
 
The terminal window will no longer respond (the PDU is rebooting).
 
To exit out of '<span class="code">screen</span>', you need to press '<span class="code">ctrl</span> + <span class="code">a</span>', release the keys, then press '<span class="code">k</span>'.
 
<syntaxhighlight lang="text">
<ctrl> + <a>
</syntaxhighlight>
 
(release)
 
<syntaxhighlight lang="text">
<k>
</syntaxhighlight>
 
Screen will ask if you want to kill the session.
 
<syntaxhighlight lang="text">
Really kill this window [y/n]
</syntaxhighlight>
 
Press '<span class="code">y</span>'
 
<syntaxhighlight lang="text">
y
</syntaxhighlight>
<syntaxhighlight lang="text">
[screen is terminating]
</syntaxhighlight>
 
Now you are back at the normal linux terminal.
 
{{note|1=Please be patient while the PDU reboots. It might take a minute.}}
 
You can test the connection to the PDU using '<span class="code">ping</span>';
 
<syntaxhighlight lang="bash">
ping -c 3 10.20.2.1
</syntaxhighlight>
<syntaxhighlight lang="text">
PING 10.20.2.1 (10.20.2.1) 56(84) bytes of data.
64 bytes from 10.20.2.1: icmp_seq=1 ttl=255 time=4.61 ms
64 bytes from 10.20.2.1: icmp_seq=2 ttl=255 time=4.30 ms
64 bytes from 10.20.2.1: icmp_seq=3 ttl=255 time=3.00 ms
 
--- 10.20.2.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2006ms
rtt min/avg/max/mdev = 3.006/3.976/4.613/0.697 ms
</syntaxhighlight>
 
Done!


{{footer}}
{{footer}}

Revision as of 00:07, 1 August 2024

 Alteeve Wiki :: Man Pages :: Anvil-configure-host

NAME

anvil-configure-host - This program configures the host for use in an Anvil! cluster.

SYNOPSIS

anvil-configure-host <command> [options]

DESCRIPTION

This picks up a job from the database and, using the data from it, configures the host to prepare it for use in an Anvil! cluster.

OPTIONS

-?, -h, --help
Show this man page.
--log-secure
When logging, record sensitive data, like passwords.
-v, -vv, -vvv
Set the log level to 1, 2 or 3 respectively. Be aware that level 3 generates a significant amount of log data.

Commands:

--job-uuid <name>
The program is normally run as a job, with data on how to configure the host defined in the job. This switch allows the running of a specific job. If this is not set, the program will search for a job that has not yet been picked up by another process. If found, that job UUID is used automatically.

AUTHOR

Written by Madison Kelly, Alteeve staff and the Anvil! project contributors.

REPORTING BUGS

Report bugs to users@clusterlabs.org

 

Any questions, feedback, advice, complaints or meanderings are welcome.
Alteeve's Niche! Alteeve Enterprise Support Community Support
© 2025 Alteeve. Intelligent Availability® is a registered trademark of Alteeve's Niche! Inc. 1997-2025
legal stuff: All info is provided "As-Is". Do not use anything here unless you are willing and able to take responsibility for your own actions.