Installing the Lingobot Service: Difference between revisions

From Lingoport Wiki
Jump to navigation Jump to search
Rdaly (talk | contribs)
Created page with "== Running The Installation Script == === With Sudo === This is the final step in the configuration process. If all goes well, your instance of LingoBot will be up and running..."
 
Rdaly (talk | contribs)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Running The Installation Script ==
===Set up install.conf ===
=== With Sudo ===
This is the final step in the configuration process. If all goes well, your instance of LingoBot will be up and running once this step has been completed.


* On the command-line shell where you have been modifying the LingoBot configuration file, save and close the file.
#
* if you have been operating as the "jenkins" user, change users so that you are on an account that has root privileges (unrestricted access to the sudo command).
# Provide your home directory, lingobot folder will be created
** Typically this will be either the "centos" account or the "ec2-user" account, depending on your installation.
#
** If you are unable to access an account with root privileges, skip to the "Without Sudo" section below.
home_directory=/home/centos
* Once this is done, simply execute the install.sh script. This script can be found in LingoBot's home directory under the "lingobot_installer" sub directory.
#
# Provide the Lingobot version
#
lingobot_image_version=
#
# Provide the Lingobot port
#
serverPort=8084
#
# Provide your Docker Hub username
#
docker_username=lingoportcustomer
#
# Provide your Docker Hub account token
#
docker_account_token=dckr_pat_cUuqyjSfv3JQRG0R5_cwmWsHceg
# Slack security config
BOT_TOKEN=xoxb-**********
APP_TOKEN=xapp-**********
COMMAND_CENTER_URL=https://your_server/command-center
COMMAND_CENTER_USER=
COMMAND_CENTER_TOKEN=
docker_image=lingoport/lingobot_dev


Example:
/var/lib/jenkins/lingoport/lingobot-<x.y>/lingobot_installer/install.sh


If everything has been configured correctly, then this script will take only a few seconds to run. Otherwise, the output of the script will tell you which aspects of the bot need to be reconfigured.  
* Verify that the <code>/home/directory</code> is correct.
If something needs to be changed, simply modify the LingoBot config file and rerun the install script until it reports a successful installation.
* The <code>lingobot_image_version=</code> value should be provided
* Make sure the <code>serverPort=8084</code> is not a port that is being used by anything else.
* Set the <code>docker_username=</code> and <code>docker_account_token=<token value></code> to the DockerHub login
* Set the <code>COMMAND_CENTER_URL</code> to the correct Command Center URL
 
==Run install.sh==
 
    chmod +x *.sh
    sudo ./install.sh
 
To check the running container status


Once this is done, your instance of LingoBot will be up and running!
    sudo docker ps


=== Without Sudo ===
If you need to re-run the install.sh, make sure to run uninstall.sh first to clean your environment.
If you are unable to access an account that has root privileges, the LingoBot installation script can be run as the "jenkins" user by including the '--nosudo' ('-n') flag.


Example:
Note: Docker image version is not the Lingobot version, check latest docker image version at  https://hub.docker.com/repository/docker/lingoport/lingobot/general
  /var/lib/jenkins/lingoport/lingobot-<x.y>/lingobot_installer/install.sh --nosudo


NOTE: if the no-sudo flag is included, the installer will neither configure nor start the LingoBot service.
To start the service manually, you must have access to root privileges. The following commands can be run to manually start the LingoBot service.
sudo cp /var/lib/jenkins/lingobot-1.0/service_files/lingoport-lingobot.service /etc/systemd/system/lingoport-lingobot.service
sudo systemctl enable lingoport-lingobot.service
sudo systemctl start lingoport-lingobot.service


Once this is done, your instance of LingoBot will be up and running!
Once this is done, your instance of LingoBot will be up and running!


== Installation Verification ==  
== Installation Verification ==  
A quick way to verify that the LingoBot service has successfully launched and can be accessed by your team, go to your collaboration environment and try sending a message to LingoBot. To do this, you may have to invite LingoBot to the room you are currently in.
A quick way to verify that the LingoBot service has successfully launched and can be accessed by your team, go to your collaboration environment (Slack, Flowdock, etc.) and try sending a message to LingoBot. To do this, you may have to invite LingoBot to the room you are currently in.


Example:
Example:
  @lingobot ping
  lingobot hello


if LingoBot responds with "PONG", then you have successfully launched LingoBot. Have Fun!
if LingoBot responds with "hello", then you have successfully launched LingoBot. Have Fun!


Verify that you see the correct projects:
Verify that you see the correct projects:
  @lingobot list projects
lingobot list projects
 
Check that the dashboard comes up.  Select the link and make sure it shows the correct dashboard.
  @lingobot show dashboard


== Troubleshooting ==
  List of all active projects:
=== I ran the install.sh script. I found that I had set some of the variables incorrectly. So, what now? ===
  Name                                                | Type                 
If the variables need to be modified:
-----------------------------------------------------|---------------|----------
* Stop the LingoBot service (for example <code>sudo systemctl stop lingoport-lingobot.service</code>, see above)
CET.IOS.testPush(testPush)                          | Localyzer    | Parent 
* edit the <code>lingobot_config.sh</code> configuration file
CET.National.testing(testing)                       | Globalyzer    | Parent 
* Run the <code>install.sh</code> script (See above)
CET.Android.test8665(test8665)                       | Globalyzer    | Parent 
* Make sure the LingoBot service has started (for example <code>sudo systemctl status lingoport-lingobot.service</code>, see above)
CET.NOAAWeatherGithub.testing(testing)               | Localyzer    | Parent

Latest revision as of 22:06, 19 March 2024

Set up install.conf

#
# Provide your home directory, lingobot folder will be created
#
home_directory=/home/centos
#
# Provide the Lingobot version
#
lingobot_image_version=
#
# Provide the Lingobot port
#
serverPort=8084
#
# Provide your Docker Hub username
#
docker_username=lingoportcustomer
#
# Provide your Docker Hub account token
#
docker_account_token=dckr_pat_cUuqyjSfv3JQRG0R5_cwmWsHceg
# Slack security config
BOT_TOKEN=xoxb-**********
APP_TOKEN=xapp-**********
COMMAND_CENTER_URL=https://your_server/command-center
COMMAND_CENTER_USER=
COMMAND_CENTER_TOKEN=
docker_image=lingoport/lingobot_dev


  • Verify that the /home/directory is correct.
  • The lingobot_image_version= value should be provided
  • Make sure the serverPort=8084 is not a port that is being used by anything else.
  • Set the docker_username= and docker_account_token=<token value> to the DockerHub login
  • Set the COMMAND_CENTER_URL to the correct Command Center URL

Run install.sh

    chmod +x *.sh
    sudo ./install.sh

To check the running container status

   sudo docker ps

If you need to re-run the install.sh, make sure to run uninstall.sh first to clean your environment.

Note: Docker image version is not the Lingobot version, check latest docker image version at https://hub.docker.com/repository/docker/lingoport/lingobot/general


Once this is done, your instance of LingoBot will be up and running!

Installation Verification

A quick way to verify that the LingoBot service has successfully launched and can be accessed by your team, go to your collaboration environment (Slack, Flowdock, etc.) and try sending a message to LingoBot. To do this, you may have to invite LingoBot to the room you are currently in.

Example:

lingobot hello

if LingoBot responds with "hello", then you have successfully launched LingoBot. Have Fun!

Verify that you see the correct projects:

lingobot list projects
List of all active projects:
Name                                                | Type                  
-----------------------------------------------------|---------------|---------- 
CET.IOS.testPush(testPush)                           | Localyzer     | Parent   
CET.National.testing(testing)                        | Globalyzer    | Parent   
CET.Android.test8665(test8665)                       | Globalyzer    | Parent   
CET.NOAAWeatherGithub.testing(testing)               | Localyzer     | Parent