This repository has been archived by the owner on Apr 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from VimukthiPerera/5.6.x
Add Ansible scripts for Identity Server 5.6.0
- Loading branch information
Showing
31 changed files
with
3,922 additions
and
370 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,114 @@ | ||
# Run ansible scripts | ||
# WSO2 Identity Server Ansible scripts | ||
|
||
This repository contains the Ansible scripts for installing and configuring WSO2 Identity Server. | ||
|
||
## Supported Operating Systems | ||
|
||
- Ubuntu 16.04 or higher | ||
|
||
## Supported Ansible Versions | ||
|
||
- Ansible 2.0.0.2 | ||
|
||
## Directory Structure | ||
``` | ||
. | ||
├── dev | ||
│ ├── group_vars | ||
│ │ └── is.yml | ||
│ ├── host_vars | ||
│ │ ├── is_1.yml | ||
│ │ └── is_2.yml | ||
│ └── inventory | ||
├── docs | ||
│ ├── images | ||
│ │ ├── Deployment-pattern-1-diagram.png | ||
│ │ └── Deployment-pattern-2-diagram.png | ||
│ ├── Pattern1.md | ||
│ └── Pattern2.md | ||
├── files | ||
│ ├── mysql-connector-java-5.1.45-bin.jar | ||
│ └── wso2is-linux-installer-x64-5.6.0.deb | ||
├── issue_template.md | ||
├── LICENSE | ||
├── pull_request_template.md | ||
├── README.md | ||
├── roles | ||
│ └── is | ||
│ ├── tasks | ||
│ │ ├── custom.yml | ||
│ │ └── main.yml | ||
│ └── templates | ||
│ ├── carbon-home | ||
│ │ ├── bin | ||
│ │ │ └── wso2server.sh.j2 | ||
│ │ └── repository | ||
│ │ ├── conf | ||
│ │ │ ├── axis2 | ||
│ │ │ │ └── axis2.xml.j2 | ||
│ │ │ ├── carbon.xml.j2 | ||
│ │ │ ├── datasources | ||
│ │ │ │ └── master-datasources.xml.j2 | ||
│ │ │ ├── identity | ||
│ │ │ │ └── identity.xml.j2 | ||
│ │ │ ├── registry.xml.j2 | ||
│ │ │ ├── tomcat | ||
│ │ │ │ └── catalina-server.xml.j2 | ||
│ │ │ └── user-mgt.xml.j2 | ||
│ │ └── deployment | ||
│ │ └── server | ||
│ │ └── eventpublishers | ||
│ │ ├── IsAnalytics-Publisher-wso2event-AuthenticationData.xml.j2 | ||
│ │ ├── IsAnalytics-Publisher-wso2event-RoleData.xml.j2 | ||
│ │ ├── IsAnalytics-Publisher-wso2event-SessionData.xml.j2 | ||
│ │ └── IsAnalytics-Publisher-wso2event-UserData.xml.j2 | ||
│ └── wso2is.service.j2 | ||
└── site.yml | ||
``` | ||
|
||
## Packs to be Copied | ||
|
||
Copy the following files to `files` directory. | ||
|
||
1. [WSO2 Identity Server 5.6.0 package](https://wso2.com/identity-and-access-management/install) | ||
2. [mysql-connector-java-5.1.45-bin.jar](https://dev.mysql.com/downloads/connector/j/5.1.html) | ||
|
||
## Running WSO2 Identity Server Ansible scripts | ||
|
||
### 1. Run the existing scripts without customization | ||
The existing Ansible scripts contain the configurations to set-up a single node WSO2 Identity Server pattern. In order to deploy the pattern, you need to replace the `[ip_address]` given in the `inventory` file under `dev` folder by the IP of the location where you need to host the Identity Server. An example is given below. | ||
``` | ||
[is] | ||
wso2is ansible_host=172.28.128.4 | ||
``` | ||
|
||
Run the following command to run the scripts. | ||
|
||
`ansible-playbook -i dev site.yml` | ||
|
||
If you need to alter the configurations given, please change the parameterized values in the yaml files under `group_vars` and `host_vars`. | ||
|
||
### 2. Customize the WSO2 Ansible scripts | ||
|
||
The templates that are used by the Ansible scripts are in j2 format in-order to enable parameterization. | ||
|
||
The `axis2.xml.j2` file is added under `roles/wso2is/templates/carbon-home/repositoy/conf/axis2/`, in order to enable customizations. You can add any other customizations to `custom.yml` under tasks of each role as well. | ||
|
||
#### Step 1 | ||
Uncomment the following line in `main.yml` under the role you want to customize. | ||
``` | ||
- import_tasks: custom.yml | ||
``` | ||
|
||
#### Step 2 | ||
Add the configurations to the `custom.yml`. A sample is given below. | ||
|
||
``` | ||
- name: "Copy custom file" | ||
template: | ||
src: path/to/example/file/example.xml.j2 | ||
dest: destination/example.xml.j2 | ||
when: "(inventory_hostname in groups['is'])" | ||
``` | ||
|
||
Follow the steps mentioned under `docs` directory to customize/create new Ansible scripts and deploy the recommended patterns. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# ---------------------------------------------------------------------------- | ||
# Copyright (c) 2018 WSO2, Inc. http://www.wso2.org | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# ---------------------------------------------------------------------------- | ||
|
||
wso2_group: wso2 | ||
wso2_user: wso2carbon | ||
setup_path: /usr/lib/wso2 | ||
product_name: wso2is | ||
product_version: 5.6.0 | ||
product_path: /opt/wso2 | ||
product_archive_deb: wso2is-linux-installer-x64-5.6.0.deb | ||
product_archive_rpm: wso2is-linux-installer-x64-5.6.0.rpm | ||
product_package_location: files | ||
jdbc_driver: mysql-connector-java-5.1.45-bin.jar | ||
systemd_path: /etc/systemd/system | ||
java_home: /usr/lib/wso2/wso2is/5.6.0/jre/jre1.8.0_172 | ||
|
||
jvm: | ||
xms: 1024 | ||
xmx: 1024 | ||
|
||
user: | ||
username: admin | ||
password: admin | ||
|
||
wso2_reg_db: | ||
driver_class_name: org.h2.Driver | ||
url: jdbc:h2:repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000 | ||
username: wso2carbon | ||
password: wso2carbon | ||
|
||
wso2_user_db: | ||
driver_class_name: org.h2.Driver | ||
url: jdbc:h2:repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000 | ||
username: wso2carbon | ||
password: wso2carbon | ||
|
||
wso2_identity_db: | ||
driver_class_name: org.h2.Driver | ||
url: jdbc:h2:repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000 | ||
username: wso2carbon | ||
password: wso2carbon | ||
|
||
wso2_consent_db: | ||
driver_class_name: org.h2.Driver | ||
url: jdbc:h2:repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000 | ||
username: wso2carbon | ||
password: wso2carbon | ||
|
||
# KeyStore which will be used for encrypting/decrypting passwords and other sensitive information. | ||
keystore: | ||
location: ${carbon.home}/repository/resources/security/wso2carbon.jks | ||
type: JKS | ||
password: wso2carbon | ||
key_alias: wso2carbon | ||
key_password: wso2carbon | ||
|
||
# System wide trust-store which is used to maintain the certificates of all the trusted parties. | ||
truststore: | ||
location: ${carbon.home}/repository/resources/security/client-truststore.jks | ||
type: JKS | ||
password: wso2carbon | ||
|
||
# Add any new changes you want to add for the group/profile below. | ||
# If you add a new file under templates and parameterized the file, the values for those parameters should be added | ||
# below. | ||
# Example: | ||
# Changes applied to bps-datasources.xml file. | ||
# bps_datasources: | ||
# driver_class_name: com.mysql.jdbc.Driver | ||
# url: jdbc:mysql://wso2is-pattern1-mysql-service:3306/WSO2_IDENTITY_DB autoReconnect=true&verifyServerCertificate=false&useSSL=true | ||
# username: wso2carbon | ||
# password: wso2carbon |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.