maintenance:general:tools:yce_setup.pl
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
maintenance:general:tools:yce_setup.pl [2020/12/08 09:44] – yspeerte | maintenance:general:tools:yce_setup.pl [2024/07/03 12:31] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | {{indexmenu_n> | ||
+ | ====== yce_setup.pl ====== | ||
+ | |||
+ | |||
+ | The '' | ||
+ | |||
+ | The **yce_setup** script is tasked to create configuration files for all components the NetYCE application is composed of and activating these configurations. These components include many background processes (often referred to as daemons) like http-, tftp-, ftp- and scp-servers, | ||
+ | |||
+ | In its interactive mode the user can add and delete NetYCE servers to its environment and define its roles. The resulting configuration setup file (''/ | ||
+ | |||
+ | > <color orange> | ||
+ | |||
+ | |||
+ | ==== net_setup dependency === | ||
+ | |||
+ | The networking addresses for the local server are taken from the '' | ||
+ | |||
+ | To setup a new NetYCE server, executing **net_setup** (as ' | ||
+ | |||
+ | |||
+ | ==== Roles and settings ==== | ||
+ | |||
+ | The yce_setup will prompt the user in a dialog to set NetYCE server parameters in several categories. The settings apply primarily to the local server, but because of the communication and replication with the remote NetYCE servers, the setup must include the full environment. | ||
+ | |||
+ | * Add new or delete existing NetYCE servers (depending on architecture license) | ||
+ | * Edit primary IPv4 and IPv6 addresses of remote servers | ||
+ | * IPv4 and IPv6 addresses of the local server are retrieved from the net_setup.conf | ||
+ | * Assign any server the role of Front-end server (Web GUI, API's, device management) | ||
+ | * Assign any server the role of Database server (up to two per environment) | ||
+ | * Set up the server to run in a non-DNS (ip-addresses only) network | ||
+ | * Enable the Web GUI to use SSL certificates (https) | ||
+ | * Limit SSL support to most hardened protocols | ||
+ | * Assign another than the default port 8080 to the GUI backend | ||
+ | * Assign the unique database id for replication | ||
+ | * Assign the primary and secondary database server for each server to use | ||
+ | * Define the single-sign-on parameters (dns-)domain and validity duration | ||
+ | * Select the use of the public NetYCE wiki server or a local private copy | ||
+ | |||
+ | Changes or additions to the setup must be repeated identically to the other servers in the environment. | ||
+ | |||
+ | <color red> | ||
+ | |||
+ | > The yce_setup script should to be started as ' | ||
+ | |||
+ | > In the dialog with yce_setup the (default) values and the user entries are shown using the color '< | ||
+ | |||
+ | > Default values are shown between square brackets ('' | ||
+ | |||
+ | > At each prompt a help message is available by entering the '' | ||
+ | |||
+ | > Abort the script by typing '' | ||
+ | |||
+ | |||
+ | ==== Invocation ==== | ||
+ | |||
+ | The **yce_setup** script is executed by the ' | ||
+ | |||
+ | < | ||
+ | $ yce_setup.pl | ||
+ | -- ---------------------------------------- | ||
+ | -- ---------------------------------------- | ||
+ | -- Starting ' | ||
+ | -- System release | ||
+ | | ||
+ | using setup for Redhat V7 | ||
+ | -- Connected to database at ' | ||
+ | |||
+ | NOTE: | ||
+ | When prompted for input help on the question is available by entering '?' | ||
+ | Incorrect responses result in a message on the expect input. | ||
+ | Just hitting < | ||
+ | The proces can be aborted at any prompt by entering ' | ||
+ | |||
+ | YCE servers currently in setup: | ||
+ | 1) devel7a.netyce.org (*) | ||
+ | | IPv4-address | ||
+ | | ||
+ | 2) devel7b.netyce.org | ||
+ | | IPv4-address | ||
+ | | ||
+ | local server is marked with (*) | ||
+ | Select the server-number to Edit/ | ||
+ | </ | ||
+ | |||
+ | The non-interactive mode is normally invoked automatically when needed. It uses the '' | ||
+ | |||
+ | < | ||
+ | $ yce_setup7.pl -r | ||
+ | -- ---------------------------------------- | ||
+ | -- Starting ' | ||
+ | -- System release | ||
+ | | ||
+ | using setup for Redhat V7 | ||
+ | -- Connected to database at ' | ||
+ | |||
+ | Current setup: | ||
+ | devel7a.netyce.org (*) | ||
+ | | IP-address | ||
+ | | users | 172.17.10.24 | ||
+ | | Database | ||
+ | | id=1 | ||
+ | devel7b.netyce.org | ||
+ | | IP-address | ||
+ | | users | 172.17.10.25 | ||
+ | | Database | ||
+ | | id=2 | ||
+ | local server is marked with (*) | ||
+ | -- Create configs for server ' | ||
+ | -- Yce: / | ||
+ | -- Retrieving file-transfer configurations... | ||
+ | can support ' | ||
+ | can support ' | ||
+ | can support ' | ||
+ | can support ' | ||
+ | -- Mojo: / | ||
+ | mojo url set to ' | ||
+ | wiki url set to ' | ||
+ | -- Yce_psmon: / | ||
+ | -- Crontab: / | ||
+ | -- Httpd: / | ||
+ | -- Mysql: / | ||
+ | |||
+ | :: | ||
+ | |||
+ | -- mojo: 6348 10365 17550 17551 20759 20763 20764 | ||
+ | mojo hot-deploy on pid 10365 | ||
+ | | ||
+ | -- yce_xch: 10426 | ||
+ | stop: / | ||
+ | wait stop ' | ||
+ | | ||
+ | wait start ' | ||
+ | -- Completed | ||
+ | </ | ||
+ | |||
+ | The yce_setup " | ||
+ | |||
+ | {{: | ||
+ | |||
+ | |||
+ | ==== Adding servers ==== | ||
+ | |||
+ | After starting **yce_setup**, | ||
+ | |||
+ | {{: | ||
+ | |||
+ | The local server reads the IP-addresses from the net_setup and can therefore not be changed. Choosing a remote server permits the server to be removed or its addresses to be updated. Servers are identified by a number as displayed in the overview (in the example, 1 and 2) | ||
+ | |||
+ | < | ||
+ | Select the server-number to Edit/ | ||
+ | cannot edit or remove the local server. | ||
+ | use ' | ||
+ | Select the server-number to Edit/ | ||
+ | Delete server ' | ||
+ | Enter IPv4-address for ' | ||
+ | Enter IPv6-address for ' | ||
+ | </ | ||
+ | |||
+ | After choosing the ' | ||
+ | |||
+ | < | ||
+ | Select the server-number to Edit/ | ||
+ | Add new server | ||
+ | Hostname for new server (without domain): | ||
+ | Domain name for new server (fqdn without hostname): | ||
+ | IPv4-address for new server: | ||
+ | IPv6-address for new server: | ||
+ | YCE servers currently in setup: | ||
+ | 1) devel7a.netyce.org (*) | ||
+ | | IPv4-address | ||
+ | | ||
+ | 2) devel7b.netyce.org | ||
+ | | IPv4-address | ||
+ | | ||
+ | 3) devel7c.netyce.org | ||
+ | | IPv4-address | ||
+ | | ||
+ | local server is marked with (*) | ||
+ | Select the server-number to Edit/ | ||
+ | </ | ||
+ | |||
+ | To change the name or domain of a remote server first remove it before re-adding it. | ||
+ | To finish this dialog type ' | ||
+ | |||
+ | |||
+ | ==== Assigning roles ==== | ||
+ | |||
+ | A NetYCE server can have two roles, that of a Front-end server and that of a Database server, or both. As with the server setup, an overview of the current roles is displayed first. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Select the number of the server to edit and a series of prompts will collect the required values. Remember that a ''?'' | ||
+ | |||
+ | |||
+ | === Front-end role === | ||
+ | |||
+ | The term " | ||
+ | |||
+ | Every front-end needs at least one database connection which can be local or remote. A basic (evaluation) NetYCE environment has one (virtual) server which has both the front-end and the database role. More production oriented setups have two of these servers. When environments scale up, more servers can be added to separate tasks into user, Command jobs, NCCM and Compliance. | ||
+ | |||
+ | As many as seven front-end servers and two database servers can combined into a single environment. For more information see the reference guide on the [[guides: | ||
+ | |||
+ | A sample session to select the options available for front-end servers: | ||
+ | |||
+ | < | ||
+ | Select the server-number to change, ' | ||
+ | ' | ||
+ | ' | ||
+ | |||
+ | NetYCE servers are expected to be registered in a DNS to resolve their fqdn into an ip-address. | ||
+ | However, for non-production environments this might not be the case. By selecting non-DNS the | ||
+ | system will be setup to function using ip-addresses only. | ||
+ | |||
+ | When setting up a NetYCE server for ' | ||
+ | entering the server IP-address in the browser, not its DNS name. This is a technical restriction | ||
+ | enforced by the browser to prevent ' | ||
+ | |||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | |||
+ | SSL can be setup to accept older (weaker) levels of TLS (transport-layer-security) | ||
+ | as well as the newer (hardened) level of TLS1.2. When selecting ' | ||
+ | the http server will only accept connections supporting TLS1.2 and reject older | ||
+ | levels. | ||
+ | |||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | </ | ||
+ | |||
+ | The selection for ' | ||
+ | |||
+ | Usually a new server is installed and made operational with the SSL certificate to be installed later. Please consult the article on the [[maintenance: | ||
+ | |||
+ | The option for SSL hardening will result in only accepting connections supporting TLS1.2 and reject older TLS levels. | ||
+ | |||
+ | |||
+ | === Database role === | ||
+ | |||
+ | The second example illustrates that only two database servers can be defined. These will automatically be configured for master/ | ||
+ | |||
+ | Each database server must have its unique id, either ' | ||
+ | |||
+ | < | ||
+ | Select the server-number to change, ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | |||
+ | NetYCE servers running a database must be assigned a unique database-id to setup | ||
+ | replication. As there are only two databases permitted, one server is must use the | ||
+ | id ' | ||
+ | |||
+ | ' | ||
+ | YCE server roles: | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | Select the server-number to change, ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | YCE server roles: | ||
+ | </ | ||
+ | |||
+ | ==== Database mapping ==== | ||
+ | |||
+ | Every NetYCE server needs at least one connection to a database. When two database servers are present, one will be assigned as the ' | ||
+ | |||
+ | It is customary to use the local database as the primary database if available. So in a standard two-server setup each server is the failover/ | ||
+ | |||
+ | In situations where the replication is prone to fail frequently due to unstable connections between the databases, it is advisable to select one database as the primary for //all// servers. This will result in the secondary becoming a ' | ||
+ | |||
+ | {{: | ||
+ | |||
+ | |||
+ | To assign a database server select its number and you are prompted to answer if the first of the database servers will be its primary. Answer ' | ||
+ | |||
+ | < | ||
+ | Select the server-number to change, ' | ||
+ | ' | ||
+ | YCE server database mapping: | ||
+ | 1) devel7a.netyce.org (*) | ||
+ | | Db-id | Primary | ||
+ | | ||
+ | 2) devel7b.netyce.org | ||
+ | | Db-id | Primary | ||
+ | | ||
+ | 3) devel7c.netyce.org | ||
+ | | Db-id | Primary | ||
+ | | ||
+ | local server is marked with (*) | ||
+ | Select the server-number to change, ' | ||
+ | </ | ||
+ | |||
+ | ==== Login setup ==== | ||
+ | |||
+ | The NetYCE web GUI uses session cookies to keep you signed at all servers in an environment for a limited duration. To allow multiple servers to use the session cookies as a means for single-sign-on (SSO) the domain name used in the cookie must match. | ||
+ | |||
+ | The session cookies are stored in memory by the browser. While the browser was not quit and the cookie is valid, no logins are required for that user. Switching user names on the same browser will replace the cookie. | ||
+ | |||
+ | < | ||
+ | Login setup: | ||
+ | Domain name for login (single-sign-on cookie)? [netyce.org] ? | ||
+ | |||
+ | NetYCE uses a session cookie to allow single-sign-on for the servers | ||
+ | that share the domain-name (or some trailing sections) specified here. | ||
+ | The default is the domain name of this server. | ||
+ | |||
+ | Domain name for login (single-sign-on cookie)? [netyce.org] | ||
+ | Hours until Login session expiry (single-sign-on cookie)? [12] ? | ||
+ | |||
+ | The single-sign-on session cookie will be valid for the duration specified | ||
+ | here. The session cookie will be lost should the browser be restarted. | ||
+ | |||
+ | Hours until Login session expiry (single-sign-on cookie)? [12] | ||
+ | Login setup: | ||
+ | | Single-sign-on domain | ||
+ | | netyce.org | ||
+ | </ | ||
+ | |||
+ | If all servers use the exact same DNS domain the SSO domain is the same. But if different DNS domains are used, the SSO domain should be modified to use the common part of the DNS domain | ||
+ | |||
+ | Example: | ||
+ | < | ||
+ | server fqdn DNS domain | ||
+ | ----------- | ||
+ | netyce01.ams.acme.com | ||
+ | netyce02.ldn.acme.com | ||
+ | </ | ||
+ | |||
+ | Only if all servers use the same SSO domain will the cookies be accepted and validated. | ||
+ | ==== Wiki setup ==== | ||
+ | |||
+ | The NetYCE public wiki is the default target for the ' | ||
+ | |||
+ | The procedure is described in the [[maintenance: | ||
+ | |||
+ | < | ||
+ | Wiki setup: | ||
+ | ' | ||
+ | |||
+ | By default the public NetYCE Wiki server will be assigned to the ' | ||
+ | the menu. When the internet is not accessible from the browser, the administrator | ||
+ | can install a local copy of the NetYCE Wiki on this server. | ||
+ | The installation instructions located at: | ||
+ | ' | ||
+ | |||
+ | ' | ||
+ | The (alias) name of the local Wiki server? [wiki] netyce-wiki | ||
+ | the domain name of the local Wiki server? [netyce.org] | ||
+ | Wiki setup: | ||
+ | Local Protocol Hostname | ||
+ | yes http | ||
+ | Is this Wiki setup correct? | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Config generation and activation ==== | ||
+ | |||
+ | After all sections are completed, a summary of the new setup is shown along with the prompt to activate it. Activation will perform many steps that assesses the server capabilities and resources, then generating the different configuration files for tis components and copying to the target locations. Finally, many of the background processes (daemons) are restarted to load the new configurations. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | When invoking the '' | ||
+ | |||
+ | < | ||
+ | | ||
+ | -- Creating configs for server ' | ||
+ | -- Yce: / | ||
+ | -- Retrieving file-transfer configurations... | ||
+ | can support ' | ||
+ | can support ' | ||
+ | can support ' | ||
+ | can support ' | ||
+ | -- Mojo: / | ||
+ | mojo url set to ' | ||
+ | wiki url set to ' | ||
+ | -- Yce_psmon: / | ||
+ | -- Crontab: / | ||
+ | -- Httpd: / | ||
+ | -- Mysql: / | ||
+ | mysql version is ' | ||
+ | mysql key_buffer set to ' | ||
+ | mysql tmpdir set to '/ | ||
+ | -- SSL certificate found. Run ' | ||
+ | -- Updating ' | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | -- Renewing NMS table permissions | ||
+ | -- Checking database replication | ||
+ | | ||
+ | -- Updating config-sync setup | ||
+ | | ||
+ | | ||
+ | -- Relaunching NetYCE daemons... | ||
+ | -- yce_psmon: 28227 | ||
+ | stop: / | ||
+ | wait stop ' | ||
+ | | ||
+ | wait start ' | ||
+ | -- yce_netmon: 2220 | ||
+ | stop: / | ||
+ | wait stop ' | ||
+ | | ||
+ | wait start ' | ||
+ | -- yce_cramer: | ||
+ | # disabled | ||
+ | -- yce_tftpd: 28351 | ||
+ | stop: / | ||
+ | wait stop ' | ||
+ | | ||
+ | wait start ' | ||
+ | -- yce_skulker: | ||
+ | stop: / | ||
+ | wait stop ' | ||
+ | wait stop ' | ||
+ | | ||
+ | wait start ' | ||
+ | -- yce_sched: 28406 | ||
+ | stop: / | ||
+ | wait stop ' | ||
+ | | ||
+ | wait start ' | ||
+ | -- yce_nccmd: 28430 | ||
+ | stop: / | ||
+ | wait stop ' | ||
+ | | ||
+ | wait start ' | ||
+ | -- yce_ibd: | ||
+ | # disabled | ||
+ | -- morbo: | ||
+ | # disabled | ||
+ | -- mojo: 5798 8363 8364 28440 28472 28473 28475 | ||
+ | mojo hot-deploy on pid 28440 | ||
+ | | ||
+ | -- yce_xch: 28500 | ||
+ | stop: / | ||
+ | wait stop ' | ||
+ | | ||
+ | wait start ' | ||
+ | -- Completed | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||