Skip to content

Commit ca08359

Browse files
committed
Merge branch 'master' into sql
2 parents 6a8120a + 923c3cc commit ca08359

File tree

1 file changed

+61
-7
lines changed

1 file changed

+61
-7
lines changed

README.md

Lines changed: 61 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ This branch uses Spring Boot Data JPA to store game records in a PostgreSQL data
2727
- [`build.gradle`](https://github.com/awslabs/eb-java-scorekeep/blob/sql/build.gradle) - Adds PostgreSQL and Spring Boot Data JPA to build dependencies
2828

2929
# Scorekeep
30-
Scorekeep is a RESTful web API implemented in Java that uses Spring to provide an HTTP interface for creating and managing game sessions and users. This project includes the scorekeep API and a frontend web app that consumes it. The frontend and API can run on the same server and domain or separately, with the API running in Elastic Beanstalk and the frontend served statically by a CDN.
30+
Scorekeep is a RESTful web API implemented in Java that uses Spring to provide an HTTP interface for creating and managing game sessions and users. This project includes the Scorekeep API and a frontend web app that consumes it. The frontend and API can run on the same server and domain or separately, with the API running in Elastic Beanstalk and the frontend served statically by a CDN.
3131

32-
The project shows the use of Spring, Angular, nginx, the AWS SDK for Java, DynamoDB, Gradle, CORS, and Elastic Beanstalk features that let you run both components on the same EC2 instance, create required DynamoDB tables as part of the Elastic Beanstalk environment, and build the API from source on-instance during deployment.
32+
The `master` branch shows the use of Spring, Angular, nginx, the AWS SDK for Java, DynamoDB, Gradle, CORS, and Elastic Beanstalk features that let you run both components on the same EC2 instance, create required DynamoDB and SNS resources as part of the Elastic Beanstalk environment, and build the API from source on-instance during deployment.
33+
34+
Other branches extend the application's functionality and show the use of other AWS services. See the readme in each branch for details about the integration, and instructions for use.
3335

3436
**Branches**
3537
- [`cognito`](https://github.com/awslabs/eb-java-scorekeep/tree/cognito) - Support login and store users in a Cognito user pool.
@@ -38,9 +40,35 @@ The project shows the use of Spring, Angular, nginx, the AWS SDK for Java, Dynam
3840
- [`xray`](https://github.com/awslabs/eb-java-scorekeep/tree/xray) - Use the AWS X-Ray SDK to instrument incoming requests, SDK clients, SQL queries, HTTP clients, and sections of code.
3941
- [`xray-gettingstarted`](https://github.com/awslabs/eb-java-scorekeep/tree/xray-gettingstarted) ([tutorial](https://docs.aws.amazon.com/xray/latest/devguide/xray-gettingstarted.html)) - Use the AWS X-Ray to instrument incoming requests and SDK clients (no additional configuration required).
4042

41-
Use the procedures in the following sections to run the project on AWS Elastic Beanstalk and configure it for local testing and development.
43+
Use the procedures in the following sections to run the project on AWS Elastic Beanstalk and configure it for local testing and development.
44+
45+
**Sections**
46+
- [Prerequisites](#prerequisites)
47+
- [Deploy the application](#deploy-the-application)
48+
- [Configure notifications](#configure-notifications)
49+
- [How it works](#how-it-works)
50+
- [Running the project locally](#running-the-project-locally)
51+
- [Contributing](#contributing)
52+
53+
# Prerequisites
54+
- User permissions - Elastic Beanstalk, IAM*
55+
- Instance profile with permission to use DynamoDB and SNS
56+
- Elastic Beanstalk environment running Java 8
57+
58+
*If you don't have permission to manage permissions in IAM, get someone who does to add DynamoDB and SNS permissions to the default Elastic Beanstalk instance profile.
59+
60+
## Get permission to use Elastic Beanstalk
61+
If you are using an IAM user with limited permissions, good work! Add Elastic Beanstalk permissions to your user account to get started.
62+
63+
*To add Elastic Beanstalk permissions to an IAM user*
64+
65+
1. Sign in to a user or role with administrator permissions.
66+
2. Open the [users page](https://console.aws.amazon.com/iam/home#/users) of the IAM console.
67+
3. Choose a user.
68+
4. Click **Add permissions**.
69+
5. Add the **AWSElasticBeanstalkFullAccess** managed policy.
4270

43-
## Create an AWS Elastic Beanstalk environment
71+
## Create an Elastic Beanstalk environment
4472
Create a Java 8 SE environment in Elastic Beanstalk to host the application.
4573

4674
*To create an Elastic Beanstalk environment running the Java 8 SE platform*
@@ -60,7 +88,7 @@ When the Scorekeep API runs in AWS Elastic Beanstalk, it uses the permissions of
6088
3. Select [AmazonDynamoDBFullAccess](https://console.aws.amazon.com/iam/home#policies/arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess) and click **Attach Policy**.
6189
3. Select [AmazonSNSFullAccess](https://console.aws.amazon.com/iam/home#policies/arn:aws:iam::aws:policy/AmazonSNSFullAccess) and click **Attach Policy**.
6290

63-
## Deploy the application
91+
# Deploy the application
6492
Deploy the source code for the project to your Elastic Beanstalk environment.
6593

6694
*To deploy the source code*
@@ -76,7 +104,7 @@ Deploy the source code for the project to your Elastic Beanstalk environment.
76104

77105
Click through the app to explore its functionality. Use the network console in your browser to see the HTTP requests that it sends to the API to read and write users, sessions, games, moves and game state to DynamoDB via the API.
78106

79-
## Configure Notifications
107+
# Configure notifications
80108
The API uses Amazon SNS to send a notification email when a game ends. To enable notifications, configure your email address in an environment variable.
81109

82110
*To enable notifications*
@@ -186,4 +214,30 @@ When you run both the API and frontend in the same Elastic Beanstalk environment
186214

187215
~/eb-java-scorekeep$ git archive -o scorekeep-v1.zip HEAD
188216

189-
5. Open your environment's Dashboard in the [Elastic Beanstalk Management Console](console.aws.amazon.com/elasticbeanstalk/home) and deploy the updated code.
217+
5. Open your environment's Dashboard in the [Elastic Beanstalk Management Console](console.aws.amazon.com/elasticbeanstalk/home) and deploy the updated code.
218+
219+
# Contributing
220+
221+
This sample application could be better with your help!
222+
223+
- Add a new game!
224+
- Implement game logic in game class. See [TicTacToe.java](https://github.com/awslabs/eb-java-scorekeep/blob/master/src/main/java/scorekeep/TicTacToe.java)
225+
- Add the class to [RulesFactory.java](https://github.com/awslabs/eb-java-scorekeep/blob/master/src/main/java/scorekeep/RulesFactory.java)
226+
- Create your own client frontend!
227+
- Web frameworks - Angular 2, React, ember, etc
228+
- Mobile app
229+
- Desktop application
230+
- Integrate with other AWS services!
231+
- CICD with CodeCommit, CodePipeline, CodeBuild, and CodeDeploy
232+
- Analytics with Kinesis, Athena, EMR, or QuickSight
233+
- Security with VPC
234+
- Performance with ElastiCache
235+
- Scalability with CloudFront
236+
- Portability with ECS or CloudFormation
237+
- Accessibility with Polly
238+
- Write tests!
239+
- Unit tests
240+
- Integration tests
241+
- Functional tests
242+
- Load tests
243+
- File an [issue](https://github.com/awslabs/eb-java-scorekeep/issues) to report a bug or request new features.

0 commit comments

Comments
 (0)