Installing the Node Installer

From Lingoport Wiki
Revision as of 16:49, 1 February 2018 by Rdaly (talk | contribs) (Installing the Node Installer)
Jump to: navigation, search

Installing the Node Installer

This can be added later as systems and jobs expand. To install the Jenkins Master/Agent system, you must have a CentOS (RedHat is not supported) Master system that has been installed from the Stack Installer and has Jenkins and the Lingoport Dashboard up and running. Then one or more agent machines with the CentOS operating system needs to be created. Prior to installation all the machines need to be able to ping one another.

  1. Get the node-installer-<version>.zip file from Lingoport and put it onto the Master system in the centos user or another user with sudo privileges.
    > unzip node-installer-<version>.zip
    > cd node-installer
    
  2. On Master, in the node-installer directory, update the login_info.yml and the hosts files.
    login_info.yml:
    
    github_url: "https://www.github.com"
    github_api_endpoint: "https://api.github.com"
    github_login: "myGitLogin"
    github_oauth_token: "<long token>"
    dashboard_login: "admin"
    dashboard_password: "admin"
    dashboard_server_url: "http://one.two.three.com:9000/"
    gz_server_username: "bob@acme.com"
    gz_server_password: "xxxxxx"
    gz_server_url: "https://www.globalyzer.com/gzserver"
    

    This will show you how to create the githut oauth token.

    hosts:
    
    [master]
    one.two.three.com
    
    [agents]
    agent1.two.three.com
    agent2.two.three.com
    
  3. Set up the Master and Agents to talk to each other using ssh.
    On master:
    > cd ~/.ssh
    > ssh-keygen
    (don't enter anything for passphase)
    

    This will create a /home/centos/.ssh/id_rsa.pub file for master. Append the contents of this file to the contents of the /home/centos/.ssh/authorized_keys file on each agent machine. If the .ssh directory or authorized_keys file does not exist, create them, but make sure that the permissions look like:

    > ls -al .ssh
    total 8
    drwx------. 2 centos centos   28 Jan 25 22:44 .
    drwx------. 4 centos centos 4096 Jan 25 22:27 ..
    -rw-------. 1 centos centos  810 Jan 25 22:04 authorized_keys
    

    Also append the contents of /home/centos/.ssh/id_rsa.pub to the authorized_keys file for centos id on the master.

    Repeat the process for the jenkins user on master and the centos user on the agents. There should not be a jenkins user on the agents yet.

    Verify that the master (as either centos or jenkins) can ssh to the agent machines successfully.

  4. Run the setup script on the Master. This will configure the In order to run the script, make sure that you have 'ansible' installed.
    > ansible-playbook --version
    

    If not found, then install:

    > cd ~centos/node-installer/
    > ./install-ansible.sh
    

    Run the setup 'playbook':

    > ansible-playbook -i hosts setup-agents.yml
    
  5. Verify the setup. Check that the following ssh commands work.
    • Master/centos user to Agent/jenkins user
    Master centos> ssh jenkins@<Agent IP address>
    
    • Master/centos user to Agent/centos user
    Master centos> ssh centos@<Agent IP address>
    
    • Master/jenkins user to Agent/jenkins user
    Master jenkins> ssh jenkins@<Agent IP address>