Commit Graph

92 Commits

Author SHA1 Message Date
Roy Clarkson
db28d2837a Apply spring formatter and checkstyle rules 2025-02-04 14:22:06 -05:00
Roy Clarkson
b147f4da97 Rename package for deployer module
The deployer module package was overloaded with another module, which break
standard Java conventions.
2025-02-04 14:20:06 -05:00
Roy Clarkson
3c83245e19 Remove pmd plugin from gradle build 2025-02-04 14:20:06 -05:00
Alberto C. Ríos
b7da77941e Adding platform timeout configuration 2024-09-26 16:59:58 +02:00
Alberto C. Ríos
2a645b81c4 Adding an AT that checks that a new stack was updated
Moving al references to cflinuxfs3
2024-03-07 13:03:37 +01:00
Alberto C. Ríos
bbf586adf2 Updating stack on upgrade (#864) 2023-09-27 15:37:00 +02:00
Alberto C. Ríos
2eadb3d2d6 Adding stack support (#856) 2023-09-18 15:13:40 +02:00
Alberto C. Ríos
00d035d4ee Fixing space parallelization
[Fixes #701]
2023-02-14 15:24:01 +01:00
Alberto C. Ríos
dfa19af38f Adding buildpacks to deployer properties
In order to enable multiple buildpacks to be added to the backing application manifest
2023-01-31 17:40:34 +01:00
Gareth Clay
ebf1fc66f3 App Broker 2.0.x
Major dependencies updates:
* Spring Boot 3
* Spring Framework 6
* Spring Cloud Open Service Broker 4.0.0-SNAPSHOT
* Java 17
* Gradle 7.6

Dockerfile:
* Update to Ubuntu Jammy
* Bump to OpenJDK 17
* Remove usage of deprecated `apt-key` tool
* Bump all other tools to latest versions (bosh, bbl, credhub etc.)

ATs:
* Pass required java buildpack env var to use Java 17 on CF
* Update `cf login` invocation to work with cf-cli v8

Small improvements:
* Reliable datetime comparison in `InMemoryServiceInstanceStateRepositoryTest`
* Update `.editorconfig` to match existing style
* Add `.sdkmanrc`
2022-12-08 09:20:41 +00:00
Gareth Clay
c0ef52da48 Remove enforcedPlatform dependency management
Allowing consumer projects to apply their own version management
2022-10-13 17:26:39 +01:00
Alexey Nesterov
a75c55b74b Use status field to check deployment status instead of state
State field was deprecated in CAPI and starting from CFJC 5.3 marked as nullable, since it won't be sent by CAPI versions 3.91+.

App Broker should use status field instead.
2021-03-12 14:50:56 +00:00
Yuxin Bai
02696c45aa Set target on bound services so deleteServiceInstance can find the right service
Also temporarily disable delete space on deleteServiceInstance

Connects to #413
2021-03-11 17:17:22 -05:00
Alberto Calleja
dc6c0c8ffe Updating CFJC to 5.1
Updating compatibility matrix with SCOSB and OSBAPI versions

Updating default buildpack to empty String. Nulls are not allowed by operations and the only way to enable autodiscovery is by passing and empty list, passing an empty String will trigget that behaviour. Updating tests to document the default buildpack
2021-02-23 13:05:57 +01:00
Gareth Clay
8141aeac3b Pre-update of backing applications
The update service flow is now:
1. pre-update backing applications
2. update backing services
3. update backing applications

The Cloud Foundry implementation has a pre-update step which applies
backing application environment updates. This allows the following
backing services update step to read the updated app environment, which
is required for correct operation of some services where a rebind is
performed on update. The final update backing applications step performs
a rolling redeployment as before to ensure both environment changes and
any credential updates resulting from a rebind are propagated to the
backing apps.

#396
2021-01-21 10:05:23 +00:00
Gareth Clay
f9a6b9ab2a API scope, Boot BOM
* Make just about everything API scope, apart from commons-text
* Also use Spring Boot BOM to manage Spring Framework and Reactor
versions in core subproject
2020-07-09 14:44:15 +01:00
Gareth Clay
a4ec5c428f Enforced platform, start of maven publication 2020-07-09 14:44:15 +01:00
Gareth Clay
5426932b3d Remove spring dependency management plugin 2020-07-09 14:44:15 +01:00
Gareth Clay
f096785ecc Make dependencies more groovy 2020-07-09 14:44:15 +01:00
Gareth Clay
036f5bbf29 ./gradlew build passing 2020-07-09 14:44:15 +01:00
Gareth Clay
2ec6bfc4af Compiling again 2020-07-09 14:44:15 +01:00
Roy Clarkson
8f055e89db Improve logging
- Only log potentially sensitive information in debug mode
- Apply consistent style
2020-06-01 11:13:44 -04:00
Yuxin Bai
e31935cfa7 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-03 12:34:56 -04:00
Yuxin Bai
d724e0dcc4 Update backing app environment on upgrade update
Closes #349
2020-04-02 13:11:17 -04:00
Roy Clarkson
483369b8e3 Maintain consistent Logger declarations 2020-02-28 15:01:27 -05:00
Yuxin Bai
b0f2cbc5f4 UpdateServiceInstance creates/binds new backing services and unbinds/deletes old backing services.
To keep the behavior consisten, also updated delete flow to delete backing
services that the backing app are actually bound to.

As part of making the new AT pass, moved delete backing services step to
before deleting backing app.

Connects to #293
2020-01-27 17:22:05 -05:00
Alberto Rios
953d3cc616 Updating licenses to 2020 2020-01-14 12:47:19 +01:00
Guillaume Berche
bc7d75bbe2 Configurable API polling duration to support async backing services (#289)
* Configurable API polling duration to support async backing services

By default cf-java-client will set a default completion timeout of 5 Mins.

The api-polling-timeout property now enables a configureable value
applied in create/update/delete service instance CF API calls for
backing services.

* Refine Configurable API polling duration to support async backing services

- now fetches the polling duration in app properties as documented, then defaults to global properties, then defaults to constant
- cleaned up comments

* Fix missing javadoc as reported by checkstyle
2019-12-16 13:03:38 +01:00
Roy Clarkson
fd78298723 Upgrade to Spring Boot 2.2.2.RELEASE
- Upgrade to Spring Framework 5.2.2.RELEASE
- Upgrade to Reactor Dysprosium-SR2
- Upgrade to CF Java Client 4.2.0.RELEASE
2019-12-10 10:02:12 -05:00
Roy Clarkson
37f5385cf8 Revert change to remove junit-vintage-engine exclusions
See note about exclusion in Spring Boot docs:
https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-testing
2019-12-02 09:40:15 -05:00
Roy Clarkson
f3f34fc63a Clean up test dependencies 2019-11-21 10:13:54 -05:00
Roy Clarkson
6b2e14b674 Enable Blockhound in select submodules 2019-11-21 08:45:21 -05:00
Alberto Rios
f5ebb7945b Bumping Spring Boot to 2.2.1.RELEASE
Upgrading mockito to match boots managed version

Removing JUnit vintage and duplicated dependencies
2019-11-20 11:44:40 -05: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