Skip to content
Snippets Groups Projects
README.md 3.71 KiB
Newer Older
  • Learn to ignore specific revisions
  • Alessandro Costantini's avatar
    Alessandro Costantini committed
    SLAT
    ======================
    
    Deploy the SLAT service using docker
    
    Requirements
    ------------
    
    You need to register a client in the IdP (redirect url: https://$SLATHOST/login/iam/authorized): the client ID and secret generated by IAM are used in the role through the following variables:
    - slat_iam_client_id
    - slat_iam_client_secret
    
    
    
    Role Variables
    --------------
    
    | Variable name  | Default Value | Description
    | -------------- | ------------- |------------- |
    | slat_port | 5001 | service port
    | slat_conf_dir |  /etc/slat | configuration dir
    | slat_image_name | "marica/slat:latest" | default slat image
    | slat_iam_issuer | N/A | IAM url
    | slat_iam_client_id | N/A | IAM client id
    | slat_iam_client_secret | N/A | IAM client secret 
    | slat_trusted_oidc_idp_list | [] | List of supported IdPs
    | slat_log_level | 'info' | Log level
    | slat_gunicorn_workers | "2" | Gunicorn workers number
    | slat_mysql_image | mysql:5.7 | Mysql docker image
    | slat_db_data_dir | /data/mysql | Path for db persistent storage
    | slat_cmdb_url  | N/A | URL of CMDB service
    | slat_mysql_root_password |  | Mysql root password |
    | slat_db_name | slat | Name of the slat database
    | slat_db_user | slat | Name of the slat database user
    | slat_db_password | | slat database password
    | slat_db_port | 3306 | slat db port
    | slat_enable_https |  False  | Set to True if you want to enable SSL support
    | slat_ssl_cert_generation | "self-signed" | Allowed values: "self-signed", "letsencrypt"
    
    
    dependencies
    ------------
    
    role: indigo-dc.docker
    
    Example Playbook
    ----------------
    
    Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
    
        - hosts: servers
          roles:
             - { role: slat, x: 42 } 
    
    
    Alessandro Costantini's avatar
    Alessandro Costantini committed
    
    
    Populate SLAT
    -------
    
    #Insert new SLA
    
    Once deployed, slat won't contain any sla, so one thing to do is to insert it manually from the GUI.
    
    1. Log into the sla portal of your paas https://<PAAS_URL>:8443 with your IAM credentials
    
    2. Select the SLAs tab in the upper menu of the page, and  click in the right button  (+ NEW SLA)
    
    3. In order to complete the creation of a new SLA, you have to specify:
    
    
    Alessandro Costantini's avatar
    Alessandro Costantini committed
        - Service: you can only choose from the services provided from the cmdb (to see which ones are available you can see the "Provider" section in the SLAT upper menu)
    
    Alessandro Costantini's avatar
    Alessandro Costantini committed
        - Customer Group: the IAM group that allow to deploy in the choosen service (you must be part of that group to define a SLA for it).
    
    Alessandro Costantini's avatar
    Alessandro Costantini committed
       - Effective from: starting date of validity.
    
    Alessandro Costantini's avatar
    Alessandro Costantini committed
       - Expiration Date: date of expiration of the sla.
    
    Alessandro Costantini's avatar
    Alessandro Costantini committed
       - Allocated resources: in this subsection you have to establish the maximum number of resources (VM , vCPUs, RAM, Public IPs, Storage) available for the sla, the PaaS will allow deployments until the total sum of the active deployments resources exceded the number agreed in the SLA.
    
    Alessandro Costantini's avatar
    Alessandro Costantini committed
      When you filled all fields click the SEND button below to confirm the creation.
    
    Alessandro Costantini's avatar
    Alessandro Costantini committed
    
    4. If all goes as expected, a green banner on top of the SLAs Page appears.
    
    
    # Import SLAs from external slat
    
    1. From the old slat db run the following command:
    ```
    mysqldump -u root -p***** --single-transaction -quick --no-create-info slat > DB.sql
    ```
    
    2. If the new slat db already contains some entries you should add the keyword IGNORE after every INSERT in the DB.sql file.
    
    Example:
    ```
     INSERT INTO `group` VALUES (...)
    ```
    Become:
    ```
    INSERT IGNORE  INTO `group` VALUES (...)
    ```
    
    3. Copy the entire file DB.sql in the new slat container and import it with the dual-command:
    
    ```
    mysql -u root -p***** slat < DB.sql
    ```
    
    4. Now you should see all entries in the SLAT gui.
    
    
    
    
    Alessandro Costantini's avatar
    Alessandro Costantini committed
    License
    -------
    
    Apache Licence v2
    
    http://www.apache.org/licenses/LICENSE-2.0
    
    
    Information
    ------------------
    
    iotwins-infn-cloud-support@lists.cnaf.infn.it