61 Commits

Author SHA1 Message Date
Yuxin Bai
c9b0763f70 Routes property overrides conflicting app manifest properties
Currently App Broker allows users to specify mutually exclusive
manifest properties - specifically `routes` along with any combination
of the deprecated `host`, `hosts`, `domain` and `domains`. This change
makes `routes` take precedence if specified.
2020-04-06 21:10:05 -04:00
Yuxin Bai
29a92a9972 Update backing app environment on upgrade update
Backported from #349
2020-04-06 16:11:15 -04:00
Roy Clarkson
b0c71e52de Enforce Spring formatting and style rules
- Add PMD checks and resolve failing rules
- Apply Spring Checkstyle rules based on Spring Framework
- Rearrange imports to be more consistent
- Format whitespace
2019-11-15 12:41:19 -05:00
Alexey Nesterov
c32dd2b103 Allow to combine domains and domain properties
This commit changes the default behaviour of `domains` property -
instead of overriding `domain` it will merge values from both into a
single list.
2019-10-31 14:07:37 +00:00
Alexey Nesterov
29e34e6a6d Add domains property
This property is supported by CAPI and `domain` is just a configuration
shortcut. However for compatibility reasons existing `domain` property
can't be removed, instead new `domains` property is added. When both are
provided in the request, `domains` will take priority.
2019-10-29 13:59:32 -04:00
Alberto Rios
4fc3a6460c Bumping immutables 2019-10-28 13:47:40 -04:00
Alexey Nesterov
7085a5b034 Make error reporting more verbose (#277)
Before only error message was dispalyed in logs providing no
information, like exception details or stacktrace. Now error message is
logged together with exception, including stacktrace.
2019-09-27 18:16:59 +02:00
Alberto Ríos
86d67441b8 Upgrades should not update environment (#276)
[Fixes #275]
2019-09-25 11:28:56 +02:00
Alberto Rios
6a732ad30f Upgrading dependencies 2019-09-18 17:49:56 +02:00
Alberto Ríos
f969e18506 Associating host and domains when received on an update (#272)
Associating host and domains when received on an update since this logic was only applied by the CFJC in the `operations.pushWithManifest`.
2019-09-13 15:45:08 +02:00
Alberto Rios
60d60b7b71 Adding debug flags when error deleting Service Instances
When the backing applications and services are in created in a separate space, the space can get deleted before we get into the delete backing service instance step.

Ideally, the deletion of the space should be handled after the backing apps and backing service instanes are deleted.

Connected to https://github.com/spring-cloud/spring-cloud-app-broker/issues/267
2019-08-27 11:28:00 +02:00
Georg Friedrich
8e860f7d89 Invert workflow when deleting service instances
Resolves #262
2019-08-26 13:41:41 +02:00
Alberto Rios
7a96f11215 Adding support for service instance upgrade
Before every update-service call would upgrade the backing application.
This changes will only create a new application package when the flag upgrade is provided.
2019-07-10 17:42:43 +02:00
Raul Avila
6beec93fe3 Configure properties in backing app when updating instance
- As the have to be whitelisted, for now we map only instances,
diskQuota and memory
2019-04-30 09:50:20 -04:00
Roy Clarkson
29be9d77be Dynamically add space developer role for non-admin clients
When using the space per service instance strategy, currently the OAuth
client requires `cloud_controller.admin` privileges to deploy apps and
services to a new space. This commit adds support for dynamically granting
the space developer role to a client which has the org manager role but not
admin privileges.

Resolves #203

Requiring client credentials to run ATs
2019-04-30 08:25:45 -04:00
Roy Clarkson
bc75e248c2 Update copyright date 2019-04-18 10:23:28 -04:00
Alexey Nesterov
3b0623aeb4 Add option to disable application start
Closes #220
2019-04-16 09:36:55 -04:00
Raul Avila
6d8edafab5 Find organization to access service instance
- `CloudFoundryOperationUtils` was accessing the default org
  to get operations, which in some cases wasn't correct, e.g.
  when getting a service instance not created in the default org.
  To solve this problem, we're now exposing a new method `getOperationsForOrgAndSpace`,
  which gets the operations in the organization and space specified.
2019-04-10 09:50:44 -04:00
Craig Walls
86eab17359 Ensure that backing app space is deleted, even if backing app doesn't exist. 2019-04-03 04:51:02 -10:00
Spring Operator
9ca8d894ae URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/ with 1 occurrences migrated to:
  https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 196 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
2019-03-25 16:12:43 -04:00
Roy Clarkson
14fc5f90b3 Use Spring Boot managed version of mockito 2019-03-15 12:03:15 -04:00
Roy Clarkson
0cf2e0e233 Add support to manage backing apps via a service
This commit adds support to stop, start, restart, and restage the backing
applications associated with a deployed service instance. The management
functions are available from the new `BackingAppManagementService`.

Resolves #118
2019-03-15 11:33:06 -04:00
Spring Operator
e6e9acff8a URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://docs.oracle.com/javase/8/docs/api/ migrated to:
  https://docs.oracle.com/javase/8/docs/api/ ([https](https://docs.oracle.com/javase/8/docs/api/) result 200).
* http://docs.spring.io/spring/docs/ migrated to:
  https://docs.spring.io/spring/docs/ ([https](https://docs.spring.io/spring/docs/) result 200).
* http://www.apache.org/licenses/LICENSE-2.0 migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
* http://www.apache.org/licenses/LICENSE-2.0.txt migrated to:
  https://www.apache.org/licenses/LICENSE-2.0.txt ([https](https://www.apache.org/licenses/LICENSE-2.0.txt) result 200).
* http://projects.spring.io/spring-cloud migrated to:
  https://projects.spring.io/spring-cloud ([https](https://projects.spring.io/spring-cloud) result 301).
2019-03-11 12:46:39 -05:00
Scott Frederick
f7646f08a7 Simplify environment variables added by extensions. Use property-style names for env var keys. 2019-02-11 12:57:56 -06:00
Scott Frederick
219aa16e1e Set an environment variable on backing apps with the value of the service instance GUID. 2019-02-01 10:49:04 +00:00
Scott Frederick
856eeb904d Clean up CC stubbing in component tests. 2019-01-25 16:51:33 -06:00
Roy Clarkson
77db951c65 Revert use of implementation dependencies
Gradle `implementation` dependencies produce `runtime` dependencies in Maven
POMs. This is generally not desired for this library projects.
2019-01-25 16:51:33 -06:00
Alberto Rios
e4963fdb68 Increasing default timeout
Improving logging
2019-01-15 15:09:25 +01:00
Alberto Rios
3cfb342960 Fixing update when target specified
Updating ATs to fail when invalid status
2019-01-14 12:24:13 +01:00
Scott Frederick
71f12d951e Fix rebinding of backing services on update 2019-01-10 14:30:09 -06:00
Alberto Rios
7b73e06522 Adding zero downtime backing app updates
Finishes #113
2019-01-10 13:26:56 -06:00
Scott Frederick
ec39297419 Add tests for CredHub integration. 2019-01-09 16:29:30 -06:00
Scott Frederick
0a2987f22d Allow backing service instances to be unbound and rebound to backing apps on service instance update. 2018-12-21 11:41:32 -06:00
Scott Frederick
9215cbeac0 Update CF Java Client and Spring CredHub dependencies.
CFJC 3.14 allows for the remove of some custom polling on service updates.
2018-12-18 13:45:55 -06:00
Scott Frederick
9487a8d793 Make update service operations return when complete. 2018-12-12 16:32:57 -05:00
Scott Frederick
292e20c18e Update backing service instances on update service. 2018-12-11 12:30:12 -06:00
rclarkson
de80479918 Clean up Gradle build configuration and dependency management 2018-11-28 15:48:12 -05:00
Scott Frederick
59e7178379 Add acceptance tests for credential providers. 2018-11-28 09:47:24 -06:00
Scott Frederick
0685897dac Add SpringSecurityOAuth2 credential provider. 2018-11-28 09:47:24 -06:00
Alberto Rios
6d4e291083 Deploying backing service instances to a space
Finishes #94
2018-11-09 15:47:53 -06:00
Alberto Rios
64f1072a4b Adding service creation 2018-11-06 11:40:29 +01:00
Alberto Rios
18aea012e3 Fixing update flow with SpacePerServiceInstance
Added TargetService to update flow
Added explicit assertion on backing app containin initial parameters afer an update
Updated AT to consider Updates with Target
Added ATs for multiple apps
Not failing when CF returns a DB error when creating a space
Not failing when space does not exist

Connected to #93
2018-10-17 11:33:10 -05:00
Scott Frederick
c4040f15ad Support authentication to CF via OAuth. 2018-10-10 17:06:36 -05:00
Scott Frederick
0ae92a598a Support setting env vars without SPRING_APPLICATION_JSON. 2018-10-08 15:14:39 -05:00
Scott Frederick
43950e446c Allow CF deployment properties defaults to be provided via configuration. 2018-10-08 14:12:28 -05:00
Scott Frederick
6c0ddfc000 Remove hard-coded defaults from CF deployment properties to allow platform defaults when no values are specified by the broker configuration. 2018-10-08 11:38:52 -05:00
Alberto Rios
b1069f8a67 Deploy backing apps to space dedicated service instance
Finishes #93
2018-10-08 13:36:20 +02:00
Scott Frederick
28532056c5 Fix configuration for PMD rule check in build. Address rule violations. 2018-10-05 15:16:02 -05:00
Scott Frederick
6853678b11 Remove prefixes from app deployment properties. 2018-10-01 16:54:27 -05:00
Scott Frederick
21a1053cca Remove dependency on Spring Cloud Deployer. Remove unused code from the deployer abstraction. 2018-10-01 16:38:26 -05:00