Files
helidon/examples/todo-app
Romain Grecourt 1d4f2ba5dc Combine webserver and webserver-netty (#315)
* webserver-netty removal, step #1:
 - move sources from webserver/netty to webserver/webserver
 - leave the SPI for now
 - remove all dependencies to webserver-netty
 - remove webserver/netty from the reactor
 - delete webserver/netty

* move webserver/test-support/src/main/resources/s-internal -> webserver/test-support/src/test/resources/

* Remove cyclic dependency between webserver and webserver-test-support:
 - move io.helidon.webserver.testsupport.SocketHttpClient.java to webserver/src/test/java/ since it's only used in webserver
 - remove the use of LoggingTestUtils from webserver

* Remove webserver SPI:
 - move BareRequest and BareResponse to io.helidon.webserver package
 - remove WebServerFactory
 - remove io.helidon.webserver.netty.Factory
 - update WebServer.Builder.build to use new NettyWebServer
 - make NettyWebServer public instead of package protected, make cstructor public

* fix copyright and checkstyles

* remove occurrence of helidon-webserver-netty in the docs

* remove META-INF/services/io.helidon.webserver.spi.WebServerFactory

* fix remaining errors related to WebServer SPI removal

* fix checkstyle error in TestClient

* fix copyright years to have the preffered form

* PR feedback: refactor io.helidon.webserver.netty into io.helidon.webserver

* fix checkstyle error in NettyWebServer
2019-01-10 11:06:19 -08:00
..
2018-12-21 16:00:38 -08:00
2018-12-21 16:00:38 -08:00
2018-12-21 16:00:38 -08:00
2018-12-21 16:00:38 -08:00

TODOs Demo Application

If you want to run behind a proxy, you need to configure the following in application.yaml of both services (find appropriate existing google-login provider configuration):

providers:
    - google-login:
        proxy-host: "proxy.host"
        client-id: "1048216952820-6a6ke9vrbjlhngbc0al0dkj9qs9tqbk2.apps.googleusercontent.com"

Build and start the applications:

mvn clean install
mvn -f demo-frontend/pom.xml  generate-resources docker:build
mvn -f demo-backend/pom.xml  generate-resources docker:build
mvn -f demo-backend/cassandra/pom.xml generate-resources docker:build

and then

docker run -d --name zipkin -p 9411:9411 openzipkin/zipkin
docker run -d --name helidon-todos-cassandra -p 9042:9042 --link zipkin helidon.demos/io/helidon/demo/helidon-todos-cassandra
docker run -d --name helidon-todos-backend -p 8854:8854 --link zipkin --link helidon-todos-cassandra helidon.demos/io/helidon/demo/helidon-todos-backend
docker run -d --name helidon-todos-frontend -p 8080:8080 --link zipkin --link helidon-todos-backend helidon.demos/io/helidon/demo/helidon-todos-frontend

or

docker-compose up

Link map:

URL Description
http://localhost:8080/index.html Main page of the demo
http://localhost:8080/metrics Prometheus metrics (frontend metrics)
http://localhost:8080/env Environment name (from configuration)
http://localhost:9411/zipkin/ Tracing page for Zipkin (served from docker started above)

Kubernetes setup: This assumes that the cluster is running DNS for services and pods. This is required for pods to find services by name as shown in the configuration.

export KUBECONFIG=./path/to/admin.conf

# From application root
cd k8s

# Create or update deployments and services for demo
kubectl apply -f k8s-deployment.yml

It takes a few minutes for all containers to start when running in Kubernetes. After all containers are started, use these URLs:

URL Description
http://localhost:30080/index.html Main page of the demo
http://localhost:30080/metrics Prometheus metrics (frontend metrics)
http://localhost:30080/env Environment name (from configuration)
http://localhost:30011/zipkin Tracing page for Zipkin (served from docker started above)