Skip to content

Commit 766abb3

Browse files
Cargo migration & Upgrade Gradle to version 9.0.0
1 parent 620f4c4 commit 766abb3

File tree

17 files changed

+95
-823
lines changed

17 files changed

+95
-823
lines changed

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ clients, as well as various other management functions.
1616

1717
The authentication service is `uaa`. It's a plain Spring MVC webapp.
1818
Deploy as normal in Tomcat or your container of choice, or execute
19-
`./gradlew run` to run it directly from `uaa` directory in the source
19+
`./gradlew bootRun` to run it directly from `uaa` directory in the source
2020
tree. When running with Gradle, it listens on port 8080 and the URL is
2121
`http://localhost:8080/uaa`
2222

@@ -78,7 +78,7 @@ If this works, you are in business:
7878

7979
$ git clone git://github.com/cloudfoundry/uaa.git
8080
$ cd uaa
81-
$ ./gradlew run
81+
$ ./gradlew bootRun
8282

8383

8484
The apps all work together with the apps running on the same port
@@ -90,13 +90,13 @@ UAA will log to a file called `uaa.log` which can be found using the following c
9090

9191
which you should find under something like:-
9292

93-
$TMPDIR/cargo/conf/logs/
93+
scripts/boot/tomcat/logs/
9494

9595
### Demo of command line usage on a local server
9696

9797
First, run the UAA server as described above:
9898

99-
$ ./gradlew run
99+
$ ./gradlew bootRun
100100

101101
From another terminal, you can use curl to verify that UAA has started by
102102
requesting system information:
@@ -117,8 +117,8 @@ Two separate Gradle tasks can be used to run the Spring Boot application
117117
- Using ./scripts/boot/boot-with-tls.sh — runs http/8080 and https/8443
118118

119119
```text
120-
java -DCLOUDFOUNDRY_CONFIG_PATH=`pwd`/scripts/cargo \
121-
-DSECRETS_DIR=`pwd`/scripts/cargo \
120+
java -DCLOUDFOUNDRY_CONFIG_PATH=`pwd`/scripts/boot \
121+
-DSECRETS_DIR=`pwd`/scripts/boot \
122122
-Djava.security.egd=file:/dev/./urandom \
123123
-Dmetrics.perRequestMetrics=true \
124124
-Dserver.servlet.context-path=/uaa \
@@ -135,32 +135,32 @@ java -DCLOUDFOUNDRY_CONFIG_PATH=`pwd`/scripts/cargo \
135135
```
136136

137137
Running Spring Boot standalone allows us to run the integration tests against it using the
138-
`./gradlew -Dcargo.tests.run=false integrationTest` with the system property preventing Gradle from starting up Apache Tomcat.
138+
`./gradlew integrationTest` with the system property preventing Gradle from starting up Apache Tomcat.
139139

140140
### Debugging local server
141141

142142
To load JDWP agent for UAA jvm debugging, start the server as follows:
143143
```sh
144-
./gradlew run -Dxdebug=true
144+
./gradlew bootRun -Dxdebug=true
145145
```
146146
or
147147
```sh
148-
./gradlew -Dspring.profiles.active=hsqldb,debug run
148+
./gradlew -Dspring.profiles.active=hsqldb,debug bootRun
149149
```
150150
You can then attach your debugger to port 5005 of the jvm process.
151151

152152
To suspend the server start-up until the debugger is attached (useful for
153153
debugging start-up code), start the server as follows:
154154
```sh
155-
./gradlew run -Dxdebugs=true
155+
./gradlew bootRun -Dxdebugs=true
156156
```
157157
or
158158
```sh
159-
./gradlew -Dspring.profiles.active=hsqldb,debugs run
159+
./gradlew -Dspring.profiles.active=hsqldb,debugs bootRun
160160
```
161161

162162
## Running a local UAA server with different databases
163-
`./gradlew run` runs the UAA server with hsqldb database by default.
163+
`./gradlew bootRun` runs the UAA server with hsqldb database by default.
164164

165165
### MySql
166166
1. Start the mysql server (e.g. a mysql docker container)
@@ -175,7 +175,7 @@ mysql> create database uaa;
175175
```
176176
3. Run the UAA server with the mysql profile
177177
```sh
178-
% ./gradlew -Dspring.profiles.active=mysql run
178+
% ./gradlew -Dspring.profiles.active=mysql bootRun
179179
```
180180

181181
### PostgreSQL
@@ -193,7 +193,7 @@ create user root with superuser password 'changeme';
193193
```
194194
3. Run the UAA server with the postgresql profile
195195
```sh
196-
% ./gradlew -Dspring.profiles.active=postgresql run
196+
% ./gradlew -Dspring.profiles.active=postgresql bootRun
197197
```
198198
4. Once the UAA server started, you can see the tables created in the uaa database (e.g., in psql interactive session)
199199
```
@@ -389,7 +389,7 @@ To debug UAA and LDAP integrations, we use an OpenLdap docker image from [VMWare
389389
1. Modify file `uaa/src/main/resources/uaa.yml` and enable LDAP by uncommenting line 7, `spring_profiles: ldap,hsqldb`
390390
2. run `docker compose up` from directory `scripts/ldap`
391391
3. From `scripts/ldap` verify connectivity to running OpenLdap container by running `docker-confirm-ldapquery.sh`
392-
4. Start UAA with `./gradlew run`
392+
4. Start UAA with `./gradlew bootRun`
393393
5. Navigate to [`/uaa`](http://localhost:8080/uaa) and log in with LDAP user `user01` and password `password1`
394394

395395
Use the below command to clean up container and volume:

0 commit comments

Comments
 (0)