Install and configure for openSUSE and SUSE Linux Enterprise¶
This section describes how to install and configure the freecell service for openSUSE Leap 42.1 and SUSE Linux Enterprise Server 12 SP1.
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
rootuser:$ mysql -u root -p
Create the
freecell_solverdatabase:CREATE DATABASE freecell_solver;
Grant proper access to the
freecell_solverdatabase: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_DBPASSwith a suitable password.Exit the database access client.
exit;
Source the
admincredentials to gain access to admin-only CLI commands:$ . admin-openrc
To create the service credentials, complete these steps:
Create the
freecell_solveruser:$ openstack user create --domain default --password-prompt freecell_solver
Add the
adminrole to thefreecell_solveruser:$ 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:
# zypper --quiet --non-interactive install
Edit the
/etc/freecell_solver/freecell_solver.conffile 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