You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Added support for Deploy and Run use case (#44)
* feat: added logic to manage subscriptionID
* fix: added sensitive flag to subscriptionId parameter
* feat: added subscription_id support into DA input
* fix: fixed cra scan with subid crn
* fix: disabled nullable for subid crn in both tests SKIP UPGRADE TEST
* fix: fixed subscriptionIDs in tests
* feat: implemented DR use-case
* docs: fixed readme
* feat: added support for DR use-case and modified existing examples
* feat: readded trial plan only for tests
* feat: renamed Trial plan to programmatic name free for testing
* docs: some renaming and fixes on docs
* docs: added link to main doc
* docs: updated doc
Use this module to provision and configure an [Enterprise Application Service](https://cloud.ibm.com/catalog/services/enterprise-application-service) instance on IBM Cloud.
23
+
Use this module to provision and configure an [Enterprise Application Service](https://cloud.ibm.com/catalog/services/enterprise-application-service) (also shorthened to EASeJava or simply to `ease`) instance on IBM Cloud.
24
+
25
+
For more information about the Enterprice Application Service product you can refer to the [product documentation](https://www.ibm.com/docs/en/ease?topic=overview)
24
26
25
27
26
28
<!-- The following content is automatically populated by the pre-commit hook -->
@@ -29,7 +31,8 @@ Use this module to provision and configure an [Enterprise Application Service](h
## Enterprise Application Service use cases support
49
+
50
+
This module supports both the use cases provided by the Enterprise Application Service:
51
+
-**Deploy and Run your application** use case: you can provide your existing prebuilt enterprise archive (EAR) or web archive (WAR) file in a Maven artifact repository, the service will allow to deploy and to run it.
52
+
-**Build, deploy and run your application** use case: you can provide your application source code through its GitHub repository URL, the service will allow to build, deploy and then run it.
53
+
54
+
For more details about the two different use-cases and the input parameters to use please refer to the sections below.
55
+
56
+
### Mandatory input parameters for both the use cases
46
57
47
-
This module has the following prerequisites as mandatory input parameters:
58
+
Both the use-cases supported by this module need you to specify the following parameters as mandatory inputs.
48
59
49
60
1. The IBM Cloud API Key (https://cloud.ibm.com/iam/apikeys) for the account where to deploy the Enterprise Application Service instance
50
61
1. Resource Group ID (https://cloud.ibm.com/account/resource-groups) containing the Enterprise Application Service instance
51
62
52
-
Optionally, the following optional input parameters are required in order to pre-configure the Enterprise Application Service instance:
63
+
## Deploy and Run use case input parameters
64
+
65
+
The following optional input parameters are required in order to pre-configure the Enterprise Application Service instance for the Deploy and Run use case:
66
+
67
+
1. URL of the Maven artifact repository storing the existing prebuilt enterprise archive (EAR) or web archive (WAR) file to run in the Enterprise Application Service instance
68
+
1. If your Maven artifact repository needs basic authentication, you can specify the username and password using the related input variables. If the repository doesn't need authentication, you can leave them to their default values.
69
+
2. URL of the GitHub repository storing the application deployment configuration to run in the Enterprise Application Service instance
70
+
3. GitHub token with read access to the configuration repository.
71
+
72
+
**Note:** all these parameters (excluding the Maven repository username and password) are mandatory in the case any of them is different than their default null value (the GitHub token is mandatory also if the configuration repository is public). When all of them are left to the default null value it will be possible to configure the instance with their values once the instance is successfully created, as describe [here](#create-an-enterprise-application-service-instance-without-setting-any-repository)
73
+
74
+
The GitHub configuration repository must satisfy a further prerequisite as described [here](#ibm-appflow-github-application-prerequisite)
53
75
54
-
1. URL of the repository storing the Java liberty application source code to build in the Enterprise Application Service instance
55
-
1. URL of the repository storing the Java liberty application configuration to build in the Enterprise Application Service instance
56
-
1. GitHub token with read access to the source code and to the configuration repositories.
76
+
For more details about this use-case please refer to the Enterprise Application Service product documentation section available [here](https://www.ibm.com/docs/en/ease?topic=deploy-run-your-application-option)
57
77
58
-
**Note:** all these parameters are mandatory in the case any of them is different than their default null value, with the GitHub token mandatory also if the source code and the configuration repositories are both public.
78
+
### Build, Deploy and Run use case input parameters
59
79
60
-
In the case the source code and the configuration repositories are not set at Enterprise Application Service instance deployment time, it will be possible to configure them through the Enterprise Application Service dashboard url that will be included in the `ease_instance` output details of this module.
80
+
The following optional input parameters are required in order to pre-configure the Enterprise Application Service instance for the Build, deploy and run use case:
61
81
62
-
In both the cases (pre-configure the Enterprise Application Service instance at deployment time or configure it through its dashboard when the instance deployment is complete), the repositories must satisfy a further prerequisite as described [here](#ibm-appflow-github-application-prerequisite)
82
+
1. URL of the GitHub repository storing your application source code to Build, deploy and run in the Enterprise Application Service instance
83
+
1. URL of the GitHub repository storing your application configuration to Build, deploy and run in the Enterprise Application Service instance
84
+
1. GitHub token with read access the source code and configuration repositories.
85
+
86
+
**Note:** all these parameters are mandatory in the case any of them is different than their default null value (the GitHub token is mandatory also if both the repositories are public). When all of them are left to the default null value it will be possible to configure the instance with their values once the instance is successfully created, as describe [here](#create-an-enterprise-application-service-instance-without-setting-any-repository)
87
+
88
+
Both the repositories must satisfy a further prerequisite as described [here](#ibm-appflow-github-application-prerequisite)
89
+
90
+
For more details about this use-case please refer to the Enterprise Application Service product documentation section available [here](https://www.ibm.com/docs/en/ease?topic=build-deploy-run-your-application-option)
63
91
64
92
#### IBM AppFlow GitHub application prerequisite
65
93
@@ -69,8 +97,13 @@ To install and configure the **IBM AppFlow** GitHub application refer to https:/
69
97
70
98
**Note:** in the case you need to configure an Enterprise Application Service instance in an environment different from IBM Cloud public platform, you need to install and configure a specific version of the **IBM AppFlow** GitHub application.
71
99
100
+
### Create an Enterprise Application Service instance without setting any repository
101
+
102
+
This module also supports to create an instance of the Enterprise Application Service without setting any source (GitHub or Maven) and configuration repository: in this case it will be possible to configure them through the Enterprise Application Service dashboard accessible through the dashboard URL returned in the `ease_instance` output details of this module.
103
+
72
104
### Java liberty sample application
73
-
For an example of source code and configuration repositories to build in an Enterprise Application Service instance you can fork the repositories below:
105
+
106
+
For an example of source code and configuration repositories to Build, deploy and run in an Enterprise Application Service instance you can fork the repositories below:
| <aname="input_config_repo"></a> [config\_repo](#input\_config\_repo)| The URL for the repository storing the configuration to use for the application to deploy through IBM Cloud Enterprise Application Service. |`string`|`null`| no |
191
+
| <aname="input_config_repo"></a> [config\_repo](#input\_config\_repo)| The URL for the repository storing the configuration to use for the application to run through Enterprise Application Service on IBM Cloud. |`string`|`null`| no |
161
192
| <aname="input_ease_name"></a> [ease\_name](#input\_ease\_name)| The name for the newly provisioned Enterprise Application Service instance. |`string`| n/a | yes |
193
+
| <aname="input_maven_repository_password"></a> [maven\_repository\_password](#input\_maven\_repository\_password)| Maven repository authentication password if needed. Default to null. |`string`|`null`| no |
194
+
| <aname="input_maven_repository_username"></a> [maven\_repository\_username](#input\_maven\_repository\_username)| Maven repository authentication username if needed. Default to null. |`string`|`null`| no |
162
195
| <aname="input_plan"></a> [plan](#input\_plan)| The desired pricing plan for Enterprise Application Service instance. |`string`|`"standard"`| no |
163
196
| <aname="input_region"></a> [region](#input\_region)| The desired region for deploying Enterprise Application Service instance. |`string`|`"us-east"`| no |
164
-
| <aname="input_repos_git_token"></a> [repos\_git\_token](#input\_repos\_git\_token)| The GitHub token to read from the application and configuration repos. It cannot be null if var.source\_repo and var.config\_repo are not null. |`string`|`null`| no |
197
+
| <aname="input_repos_git_token"></a> [repos\_git\_token](#input\_repos\_git\_token)| The GitHub token to read from the application and configuration repositories. It cannot be null if var.source\_repo and var.config\_repo are not null. |`string`|`null`| no |
165
198
| <aname="input_resource_group_id"></a> [resource\_group\_id](#input\_resource\_group\_id)| The ID of the resource group to use for the creation of the Enterprise Application Service instance. |`string`| n/a | yes |
166
-
| <aname="input_source_repo"></a> [source\_repo](#input\_source\_repo)| The URL for the repository storing the source code of the application to deploy through IBM Cloud Enterprise Application Service. |`string`|`null`| no |
199
+
| <aname="input_source_repo"></a> [source\_repo](#input\_source\_repo)| The URL for the repository storing the source code of the application or the URL of the Maven artifact repository storing the existing prebuilt archive (WAR or EAR) to deploy and run through Enterprise Application Service on IBM Cloud. |`string`|`null`| no |
200
+
| <aname="input_source_repo_type"></a> [source\_repo\_type](#input\_source\_repo\_type)| Type of the source code repository. For maven source repository type, use value `maven`. Git for GitHub repository. Default value set to git. |`string`|`"git"`| no |
167
201
| <aname="input_subscription_id"></a> [subscription\_id](#input\_subscription\_id)| ID of the subscription to use to create the Enterprise Application Service instance. |`string`| n/a | yes |
168
202
| <aname="input_tags"></a> [tags](#input\_tags)| Metadata labels describing the service instance, i.e. test |`list(string)`|`[]`| no |
A Build, deploy and run use-case example to show how to provision an Enterprise Application Service instance by passing application source and configuration repositories as input.
4
+
In addiction to the two repositories, the example shows how to include the GitHub token with the right permissions to access the repositories: in the example the token is pulled from an IBM Cloud secrets manager instance where it is stored, by passing the secret CRN which is used to extract the Secrets Manager instance, its region and the secretID to pull the secret value
5
+
Note that the three parameters (repositories and token) are mandatory if any of them is not null.
6
+
7
+
The following resources are provisioned by this example:
8
+
- A new resource group, if an existing one is not passed in.
9
+
- A new Enterprise Application Service instance in the given resource group on an IBM Cloud account.
A Deploy and run use-case example to show how to provision an Enterprise Application Service instance by passing an already built maven application through its maven repository URL as source repository and the application configuration through the config repository as input parameters.
4
+
The example sets also the var.source_repo_type input variable to "maven" and the "username" and "password" values to a set of fake values for testing purposes
5
+
In addiction to the configuration repository, the example shows how to
6
+
- include the GitHub token with the right permissions to access it: in the example the token is pulled from an IBM Cloud secrets manager instance where it is stored, by passing the secret CRN which is used to extract the Secrets Manager instance, its region and the secretID to pull the secret value.
7
+
- include the maven repository credentials (username and password)
8
+
Note that the three parameters, maven and configuration repositories and the github token, are mandatory if any of them is not null.
9
+
10
+
The following resources are provisioned by this example:
11
+
- A new resource group, if an existing one is not passed in.
12
+
- A new Enterprise Application Service instance in the given resource group on an IBM Cloud account.
# as the EASeJava app deployment expects some asynch tasks to be performed we wait for a configured interval before loading the resource instance details
0 commit comments