Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/asgeir-s/microservice
microservice-seed with Akka, Akka HTTP, Akka HTTP Testkit, Docker, CircleCI, continuous integration/deployment, Elastic Beanstalk (AWS) and Scala Test (service- and unit tests)
https://github.com/asgeir-s/microservice
akka akka-http boilerplate
Last synced: 20 days ago
JSON representation
microservice-seed with Akka, Akka HTTP, Akka HTTP Testkit, Docker, CircleCI, continuous integration/deployment, Elastic Beanstalk (AWS) and Scala Test (service- and unit tests)
- Host: GitHub
- URL: https://github.com/asgeir-s/microservice
- Owner: asgeir-s
- Created: 2015-05-25T12:15:41.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-03-08T15:17:25.000Z (over 8 years ago)
- Last Synced: 2024-04-09T20:00:02.767Z (7 months ago)
- Topics: akka, akka-http, boilerplate
- Language: Scala
- Homepage:
- Size: 13.7 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Microservice Seed for Akka HTTP
Developer seed, making it easy to get started developing with:
- Akka
- Akka HTTP
- Akka HTTP Testkit
- Service test
- Unit test
- Docker
- CircleCI (with continuous integration/deployment)
- Elastic Beanstalk (AWS)
- Scala Test## OSX Docker Set Up
One time setup:
install boot2docker then:boot2docker init
VBoxManage modifyvm "boot2docker-vm" --natpf1 "postgres-port,tcp,127.0.0.1,5432,,5432" #osx specific bind (local) # set postgres to "listen on *" and "host all all 0.0.0.0/0 trust"Setup on each shell:
boot2docker start
eval "$(boot2docker shellinit)"
## Runmake test => for running all tests
make build => for building jar and Docker image
make run-l => for running docker-image locally
sbt run => running application locally without Docker
available addresses:http://localhost:8888/ping
http://localhost:8888/route/watever/deep## Deployment
The circle file is setup to deploy automatically to staging area. But for this to work you have to setup the application and environment on AWS Elastic Beanstalk (you can use the AWS console). Then configure EB_BUCKET, EB_APPLICATION_NAME and EB_ENVIRONMENT_NAME in sh/deploy.sh script.
#### To deploy from local
One time setup:
cd docker
eb init (then select environment etc...)
Thenmake deploy-s
or
make deploy-p## Makefile
-test
-test-u (unit)
-test-s (service)
-run-l (run local)
-build (builds a artifect and place it in the docker folder and after that build the docker container)
-deploy-s (deploy on staging)
-test-s-s (service tests ageins staging)
-deploy-p (deploy in production)## Troubleshooting
This version of akka is logging a error when dropping a TLS connection:[ERROR] [03/08/2016 16:10:27.036] [default-akka.actor.default-dispatcher-2] [akka://default/user/StreamSupervisor-0/flow-1-0-unknown-operation] Error in stage [recover]: No elements passed in the last 1 minute. (akka.http.impl.engine.HttpConnectionTimeoutException)
[DEBUG] [03/08/2016 16:10:27.037] [default-akka.actor.default-dispatcher-2] [akka://default/user/StreamSupervisor-0/flow-1-0-unknown-operation] Aborting tcp connection because of upstream failure: No elements passed in the last 1 minute.Don't worry about this. Should only be a DEBUG entry on next version
## Resources
Some good resources:
- [Iterators: akka-http-microservice](https://github.com/theiterators/akka-http-microservice "akka-http-microservice")
- [Iterators: reactive-microservices](https://github.com/theiterators/reactive-microservices "reactive-microservices")
- [Akka Docs](http://akka.io/docs/ "akka docs")