GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - spring-attic/scripts

This repository was archived by the owner on Apr 20, 2022. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

534 Commits
534 Commits

Folders and files

NameName
Last commit message
Last commit date
.mvn
.mvn
 
 
authserver @ 30095a5
authserver @ 30095a5
 
 
aws @ 328b130
aws @ 328b130
 
 
brewery @ 24a3826
brewery @ 24a3826
 
 
build @ 4a5bbcd
build @ 4a5bbcd
 
 
bus @ fcd1b04
bus @ fcd1b04
 
 
circuitbreaker @ 6d60e49
circuitbreaker @ 6d60e49
 
 
cli @ 674a7bc
cli @ 674a7bc
 
 
cloudfoundry @ a3208c2
cloudfoundry @ a3208c2
 
 
cluster @ 76afe6e
cluster @ 76afe6e
 
 
commons @ b9a5fab
commons @ b9a5fab
 
 
config @ ab865ef
config @ ab865ef
 
 
config-repo @ bb51f41
config-repo @ bb51f41
 
 
configserver @ 8cb3fb0
configserver @ 8cb3fb0
 
 
consul @ dcb083f
consul @ dcb083f
 
 
contract @ a34322e
contract @ a34322e
 
 
customers-stores @ f8ca6d7
customers-stores @ f8ca6d7
 
 
demo
demo
 
 
docs
docs
 
 
eureka @ 4518c07
eureka @ 4518c07
 
 
function @ 63be04c
function @ 63be04c
 
 
gateway @ 58d1a1a
gateway @ 58d1a1a
 
 
gcp @ 40284d3
gcp @ 40284d3
 
 
hystrix-dashboard @ e89c345
hystrix-dashboard @ e89c345
 
 
kubernetes @ f651d86
kubernetes @ f651d86
 
 
locks @ b47535a
locks @ b47535a
 
 
netflix @ b1680e6
netflix @ b1680e6
 
 
openfeign @ c9fe3af
openfeign @ c9fe3af
 
 
security @ 7a3c5a3
security @ 7a3c5a3
 
 
sleuth @ 20280e8
sleuth @ 20280e8
 
 
sso @ 26d0bd4
sso @ 26d0bd4
 
 
starters @ e6b945b
starters @ e6b945b
 
 
stream @ 137b64c
stream @ 137b64c
 
 
stream-core @ a2f3c87
stream-core @ a2f3c87
 
 
task @ b2ce87d
task @ b2ce87d
 
 
tests @ d41e9be
tests @ d41e9be
 
 
turbine @ b2ecae2
turbine @ b2ecae2
 
 
vault @ e93e1ff
vault @ e93e1ff
 
 
zookeeper @ 24cd84e
zookeeper @ 24cd84e
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
.mrconfig
.mrconfig
 
 
.travis.yml
.travis.yml
 
 
Guardfile
Guardfile
 
 
LICENSE
LICENSE
 
 
README.adoc
README.adoc
 
 
build.sh
build.sh
 
 
demo_deploy.sh
demo_deploy.sh
 
 
demo_undeploy.sh
demo_undeploy.sh
 
 
docker-compose.yml
docker-compose.yml
 
 
for_each.sh
for_each.sh
 
 
kill.sh
kill.sh
 
 
mvnw
mvnw
 
 
mvnw.bat
mvnw.bat
 
 
mvnw.cmd
mvnw.cmd
 
 
pom.xml
pom.xml
 
 
release_train.sh
release_train.sh
 
 
run.sh
run.sh
 
 
services_deploy.sh
services_deploy.sh
 
 
services_undeploy.sh
services_undeploy.sh
 
 

Repository files navigation

scripts is no longer actively maintained by VMware, Inc.

The spring-cloud-samples can be run as a demo locally by just cloning the individual projects and running them. This project can be used to manage updating and deploying the sample apps to cloudfoundry.

Running Locally

Pre-requisites: Maven (3) and Java (1.7). To run the Customers UI you also need the Spring Boot CLI. Clone the repository and initialize submodules:

$ git clone https://github.com/spring-cloud-samples/scripts
$ cd scripts
$ ./build.sh

(You can add `-DskipTests' if you like, or just use `./mvnw' directly, once the submodules are initialized. If you are starting from scratch, the build'' module needs to be installed first, followed by the starters''.)

You also nee Mongodb and RabbitMQ and Redis. If you don’t have those, and you do have Docker, you can run them in Docker (via docker-compose):

$ docker-compose up
...
<mongo starts up>
<rabbit starts up>
<redis starts up>

the containers for the server processes write their data locally in ./data_*. Those files will be owned by root, so watch out when it comes to remove them.

NOTE: Docker version 1.5 and Compose version 1.1.0 are confirmed to work. The latest versions have not been tested and may have problems.

Docker on a mac

Docker on a mac requires boot2docker. Because docker is running in a virtual machine, The ip addresses of mongo, rabbit and redis are not 127.0.0.1. You can use virtualbox port forwarding to address this issue with the following commands (from here):

# vm must be powered off
VBoxManage modifyvm "boot2docker-vm" --natpf1 "tcp-port27017,tcp,,27017,,27017"
VBoxManage modifyvm "boot2docker-vm" --natpf1 "tcp-port6379,tcp,,6379,,6379"
VBoxManage modifyvm "boot2docker-vm" --natpf1 "tcp-port15672,tcp,,15672,,15672"
VBoxManage modifyvm "boot2docker-vm" --natpf1 "tcp-port5672,tcp,,5672,,5672"

Docker alternative on a mac

If you prefer not to use docker-compose you can install mongo, rabbit and redis:

brew install mongodb rabbitmq redis

To run the apps (each in a different terminal)

$ rabbitmq-server
$ mongod --config /usr/local/etc/mongod.conf
$ redis-server /usr/local/etc/redis.conf

Run the apps:

$ ./run.sh

You can kill the processes using ./kill.sh, and both scripts know how to operate on individual apps or subsets, e.g. (the default):

$ ./run.sh configserver eureka customers stores

To run the UI with the maps, get the Spring Boot CLI, and install the platform CLI plugin, e.g. with GVM:

$ gvm install springboot 1.2.0.RC1
$ gvm use springboot 1.2.0.RC1

and finally install the Spring Cloud plugin:

$ spring install org.springframework.cloud:spring-cloud-cli:1.0.0.BUILD-SNAPSHOT

Then run the app

$ (cd customers-stores/customers-ui; spring run app.groovy)

Running on Cloud Foundry

Pre-requisites:

  • Maven (3)

  • Java (1.8)

  • the cf CLI

  • Cloud Foundry with Java buildpack version 2.5 or greater (for Java 1.8 support)

Clone the repository and initialize submodules:

$ git clone https://github.com/spring-cloud-samples/scripts
$ cd scripts
$ ./build.sh
$ ./services_deploy.sh
$ ./demo_deploy.sh

The result should be a bunch of apps running in the default space for your default org, with names prefixed by your local userid, e.g.

$ cf apps
...
dsyerconfigserver      started  1/1  512M  1G    dsyerconfigserver.cfapps.io
dsyereureka            started  1/1  512M  1G    dsyereureka.cfapps.io
dsyercustomers         started  1/1  512M  1G    dsyercustomers.cfapps.io
dsyerstores            started  1/1  512M  1G    dsyerstores.cfappps.io
...

The configserver and eureka apps will have been registered as user provided services, and bound to the other apps:

$ cf services
...
name                 service        plan  bound apps
dsyerconfigserver   user-provided        dsyercustomers, dsyereureka, dsyerstores
dsyereureka         user-provided        dsyerconfigserver, dsyercustomers, dsyerstores
...

You can check that it is all working by pinging the eureka app endpoints and seeing the other apps registered. E.g. visit http://dsyereureka.cfapps.io/eureka/apps in a browser. Other useful links for diagnosis and investigating what’s going on:

  • http://dsyerconfigserver.cfapps.io/customers/cloud

  • http://dsyercustomers.cfapps.io/env

  • http://dsyerstores.cfapps.io/env

The stores app comes pre-populated with a Mongo database full of Starbucks locations. The customers app is empty to start (and uses an in-memory database) so you have to POST some data into it, e.g.

$ curl -i -H "Content-Type: application/json" http://dsyercustomers.cfapps.io/customers -d @customers-stores/rest-microservices-customers/src/test/resources/customers.json

Then when you visit the customers app at http://dsyercustomers.cfapps.io/customers you should see a customer (Ollie) and a link to nearby stores. If the stores app did not register with eureka, or if you stop the the stores app intentionally (cf stop …​), then the stores link will be missing in the customers app (simple example of a circuit breaker).

Sometimes it is also useful to undeploy the services (and unbind them from apps etc.), and redeploy them:

$ ./services_undeploy.sh
$ ./services_deploy.sh
$ ./demo_deploy.sh

It should all work on Pivotal Web Services, by default, or on any Cloudfoundry instance (e.g. PCF or a local single VM instance) if you set the DOMAIN environment variable to the DNS domain that the service is running in.

To run on bosh-lite

Deploy mongodb using https://github.com/cloudfoundry-community/cf-services-contrib-release

export DOMAIN=10.244.0.34.xip.io
export PLATFORM_HOME=/Users/sgibb/workspace/spring/spring-cloud-samples #where all spring-cloud-samples are checked out
export MONGO_URI=mongodb://192.168.50.1/stores #mongo running on host #TODO install mongo as a service

Build documentation

You can easily create the documentation for a particular release train using the release_train.sh script. You can run it in an interactive mode - then you’ll get prompted for all entries, or you can provide the values of the name of the release train together with the names and versions of modules. You can run ./release_train -h for more information.

About

No description, website, or topics provided.

Resources

Readme
Apache-2.0 license

Code of conduct

Code of conduct

Security policy

Security policy
Activity
Custom properties

Stars

69 stars

Watchers

0 watching

Forks

47 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.