2018-02-23 11:19:33 +01:00
# Flexlm
1. [Overview ](#overview )
2. [Role Variables ](#role-variables )
3. [Example Playbook ](#example-playbook )
4. [Configuration ](#configuration )
2018-02-27 12:05:11 +01:00
5. [Known Issues ](#known-issues )
6. [Development ](#development )
7. [License ](#license )
8. [Author Information ](#author-information )
2018-02-23 11:19:33 +01:00
## Overview
2018-02-28 11:31:02 +01:00
A role to manage Flexlm daemon and licence/binaries files.
2018-02-23 11:19:33 +01:00
## Role Variables
2018-02-27 14:05:07 +01:00
* **flexlm__required_packages** : List of required packages requested as 'flexlm' dependencies [default : `lsb-core` ]
* **flexlm__deploy_state** : The desired state this role should achieve. [default : `present` ].
2019-10-08 10:16:04 +02:00
* **flexlm__lmgrd_version** : Version of `lmgrd` to use [default : `11.16.2.1` ].
2018-02-23 14:32:08 +01:00
* **flexlm__lmgrd_source** : Source of the `lmgrd` bin to send [default : `usr/local/bin/lmgrd` ].
* **flexlm__lmgrd_path** : The place to store `lmgrd` bin [default : `/usr/local/bin/lmgrd` ].
* **flexlm__lmutil_source** : Source of the `lmutil` bin to send [default : `usr/local/bin/lmutil` ].
* **flexlm__lmutil_path** : The place to store `lmutil` bin [default : `/usr/local/bin/lmutil` ].
2018-02-23 15:27:53 +01:00
* **flexlm__user_name** : Username used to launch `lmgrd` [default : `flexlm` ].
2018-02-23 15:56:31 +01:00
* **flexlm__service_unit_content** : Template used to generate the previous file [default : `etc/systemd/system/flexlm.service.j2` ].
2018-02-28 11:31:02 +01:00
* **flexlm__licences** : Lists to manage vendor daemon and licence files [default : `[]` ].
2018-02-23 11:19:33 +01:00
## Example Playbook
2018-02-27 12:05:11 +01:00
* Manage Flexlm to provide Intel Fortran (without binaries) :
2018-02-23 16:37:38 +01:00
2018-02-27 08:32:20 +01:00
``` yaml
2018-02-23 16:37:38 +01:00
- hosts: intel-lm
2018-02-27 08:32:20 +01:00
roles:
2018-02-23 16:37:38 +01:00
- role: ipr-cnrs.flexlm
2018-02-27 12:05:11 +01:00
flexlm__licences:
- name: intel
description: 'flexlm Licence Manager for Matlab'
bin_path: '/opt/intel/bin'
lic_path: '/opt/matlab/etc/licence.lic' # need to be a file
2018-02-23 16:37:38 +01:00
```
2018-02-27 12:05:11 +01:00
* Manage Flexlm to provide Matlab Licence and vendor daemon binaries :
2018-02-27 08:32:20 +01:00
```yaml
- hosts: matlab-lm
roles:
- role: ipr-cnrs.flexlm
flexlm__licences:
- name: matlab
2018-02-27 12:05:11 +01:00
description: 'flexlm Licence Manager for Matlab'
2018-02-27 08:32:20 +01:00
bin_path: '/opt/matlab/bin'
bin_src: '{{ inventory_dir + "/../resources/service/matlab-lm/bin/" }}'
2018-02-27 09:36:44 +01:00
lic_path: '/opt/matlab/etc/licence.lic' # need to be a file
lic_src: '{{ inventory_dir + "/../resources/host/matlab-lm.domain/etc/licence.lic" }}' # need to be a file
2018-02-27 08:32:20 +01:00
```
2018-02-23 11:19:33 +01:00
## Configuration
This role will :
2018-02-23 15:56:31 +01:00
* Copy the `lmgrd` and `lmutil` binaries to the client.
2018-02-23 15:27:53 +01:00
* Create a specific user to launch daemon.
2018-02-28 11:31:02 +01:00
* Set up a systemd service (flexlm-item.name). [Thanks to Kalebo instructions][kalebo instruction flexlm systemd].
2018-02-27 12:05:11 +01:00
* Copy vendor daemon binaries to the host if source is specified.
* Copy licence file to the host if source is specified.
2018-02-28 15:04:06 +01:00
* Create a symlink (/usr/tmp) to /tmp to avoid error.
2018-02-23 14:32:08 +01:00
The `lmgrd` and `lmutil` binaries comes from [Mathworks][mathworks download url] in version **flexlm__lmgrd_version** .
2018-02-23 11:19:33 +01:00
2018-02-27 12:05:11 +01:00
## Known Issues
* If a value of one licence change in **flexlm__licences** var, all services will be restarted.
2018-02-23 11:19:33 +01:00
## Development
This source code comes from our [Gogs instance][flexlm source] and the [Github repo][flexlm github] exist just to be able to send the role to Ansible Galaxy…
But feel free to send issue/PR anywhere :)
Thanks to this [hook][gogs to github hook], Github automatically got updates from our [Gogs instance][flexlm source] :)
## License
[WTFPL][wtfpl website]
## Author Information
Jérémy Gardais
* Source : [on IPR's Gogs][flexlm source]
* [IPR][ipr website] (Institut de Physique de Rennes)
[gogs to github hook]: https://stackoverflow.com/a/21998477
[flexlm source]: https://git.ipr.univ-rennes1.fr/cellinfo/ansible.flexlm
[flexlm github]: https://github.com/ipr-cnrs/flexlm
[wtfpl website]: http://www.wtfpl.net/about/
[ipr website]: https://ipr.univ-rennes1.fr/
2018-02-23 14:32:08 +01:00
[mathworks download url]: https://fr.mathworks.com/support/install/license_manager_files.html
2018-02-23 15:56:31 +01:00
[kalebo instruction flexlm systemd]: https://gist.github.com/kalebo/fd39edb6c6e4ebed41f7eab2d9925ebc