Install and configure for Red Hat Enterprise Linux and CentOS¶
This section describes how to install and configure the freecell service for Red Hat Enterprise Linux 7 and CentOS 7.
Prerequisites¶
Before you install and configure the freecell service, you must create a database, service credentials, and API endpoints.
To create the database, complete these steps:
Use the database access client to connect to the database server as the
root
user:$ mysql -u root -p
Create the
freecell_solver
database:CREATE DATABASE freecell_solver;
Grant proper access to the
freecell_solver
database:GRANT ALL PRIVILEGES ON freecell_solver.* TO 'freecell_solver'@'localhost' \ IDENTIFIED BY 'FREECELL_SOLVER_DBPASS'; GRANT ALL PRIVILEGES ON freecell_solver.* TO 'freecell_solver'@'%' \ IDENTIFIED BY 'FREECELL_SOLVER_DBPASS';
Replace
FREECELL_SOLVER_DBPASS
with a suitable password.Exit the database access client.
exit;
Source the
admin
credentials to gain access to admin-only CLI commands:$ . admin-openrc
To create the service credentials, complete these steps:
Create the
freecell_solver
user:$ openstack user create --domain default --password-prompt freecell_solver
Add the
admin
role to thefreecell_solver
user:$ openstack role add --project service --user freecell_solver admin
Create the freecell_solver service entities:
$ openstack service create --name freecell_solver --description "freecell" freecell
Create the freecell service API endpoints:
$ openstack endpoint create --region RegionOne \ freecell public http://controller:XXXX/vY/%\(tenant_id\)s $ openstack endpoint create --region RegionOne \ freecell internal http://controller:XXXX/vY/%\(tenant_id\)s $ openstack endpoint create --region RegionOne \ freecell admin http://controller:XXXX/vY/%\(tenant_id\)s
Install and configure components¶
Install the packages:
# yum install
Edit the
/etc/freecell_solver/freecell_solver.conf
file and complete the following actions:In the
[database]
section, configure database access:[database] ... connection = mysql+pymysql://freecell_solver:FREECELL_SOLVER_DBPASS@controller/freecell_solver
Finalize installation¶
Start the freecell services and configure them to start when the system boots:
# systemctl enable openstack-freecell_solver-api.service
# systemctl start openstack-freecell_solver-api.service