Skip to content

Latest commit

 

History

History

db2_schema_provisioning

Ansible Db2 schema provisioning

This project provides the required sample playbooks and roles to create the new instance of an application1 to provision Db2 schema.

It is a good practice to review the playbook sample contents before executing them. It will help you understand the requirements in terms of space, location, names, authority, and the artifacts that will be created and cleaned up. Although samples are written to operate without the need for the user’s configuration, flexibility is written into the samples because it is not easy to determine if a sample has access to the host’s resources. Review the playbook notes sections for additional details and configuration.

Playbook Summary

Role Summary

Before this task

These sample playbooks are designed to exploit the Db2 DevOps Experience (DOE) APIs. An environment where Db2 DevOps Experience is installed and operating is required.

In addition, the Db2 schema provisioning sample playbook can be applied after your administrator defines the Db2 subsystem, team, environment and the application, or the set of Db2 objects that can be provisioned as an unit under DOE. These information will be the input parameters for the playbook.

Getting Started

If you are unfamiliar with playbooks, you can review our detailed configuration guide.

Update the playbook-specific variables in vars/db2_schema.yml, based on the behavior that you want.

  1. zos_target_address - Hostname of the system on which Db2 for z/OS DevOps Experience is running. Server name used to access the DOE rest apis.
  2. valid_port_number - Port number of Db2 DevOps Experience Server.
  3. valid_username - Username used to access the DOE REST API.
  4. valid_password - Password used to access the DOE REST API.
  5. valid_app_name - The name for the application that the instance is provisioned from. Db2 DevOps Experience validates this name to ensure that it exists.
  6. valid_team_name - The name for the team which the instance is provisioned under. Db2 DevOps Experience validates this name to ensure that it exists.
  7. valid_inst_name - The name for the newly provisioned instance. The name cannot contain the symbols for less-than (<) , greater-than (>) , or ampersand (&). Db2 DevOps Experience validates this name to ensure that it is unique across all of the existing instances.
  8. with_data - Boolean that gives option to user to provision the app instance with or without data.

Run the playbook

  1. To run the DB2 schema provisioning playbook, type the following command from the root of this repository:

ansible-playbook db2-schema-provision.yml

  1. To run the de-provisioning DB2 schema, type the following command from the root of this repository:

ansible-playbook db2-schema-deprovision.yml

Note: 

1 An application is a set of objects, such as tablespaces, tables, and indexes that are grouped to be managed and provisioned as a single unit for the use of an application program or a set of application programs. Application objects are logical, which means that they are only references to the objects. When users provision instances of an application, the referenced objects are copied to create the instances.

Copyright

© Copyright IBM Corporation 2021

License

Licensed under Apache License, Version 2.0

Support

Please refer to the support section for more details.