You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+61-7Lines changed: 61 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,9 +58,11 @@ The Scorekeep API integration is implemented in the following files-
58
58
-`build.gradle` - Adds the Lambda module of the AWS SDK to the Gradle build.
59
59
60
60
# Scorekeep
61
-
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.
61
+
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.
62
62
63
-
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.
63
+
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.
64
+
65
+
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.
64
66
65
67
**Branches**
66
68
-[`cognito`](https://github.com/awslabs/eb-java-scorekeep/tree/cognito) - Support login and store users in a Cognito user pool.
@@ -69,9 +71,35 @@ The project shows the use of Spring, Angular, nginx, the AWS SDK for Java, Dynam
69
71
-[`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.
70
72
-[`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).
71
73
72
-
Use the procedures in the following sections to run the project on AWS Elastic Beanstalk and configure it for local testing and development.
74
+
Use the procedures in the following sections to run the project on AWS Elastic Beanstalk and configure it for local testing and development.
75
+
76
+
**Sections**
77
+
-[Prerequisites](#prerequisites)
78
+
-[Deploy the application](#deploy-the-application)
-[Running the project locally](#running-the-project-locally)
82
+
-[Contributing](#contributing)
83
+
84
+
# Prerequisites
85
+
- User permissions - Elastic Beanstalk, IAM*
86
+
- Instance profile with permission to use DynamoDB and SNS
87
+
- Elastic Beanstalk environment running Java 8
88
+
89
+
*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.
90
+
91
+
## Get permission to use Elastic Beanstalk
92
+
If you are using an IAM user with limited permissions, good work! Add Elastic Beanstalk permissions to your user account to get started.
93
+
94
+
*To add Elastic Beanstalk permissions to an IAM user*
95
+
96
+
1. Sign in to a user or role with administrator permissions.
97
+
2. Open the [users page](https://console.aws.amazon.com/iam/home#/users) of the IAM console.
98
+
3. Choose a user.
99
+
4. Click **Add permissions**.
100
+
5. Add the **AWSElasticBeanstalkFullAccess** managed policy.
73
101
74
-
## Create an AWS Elastic Beanstalk environment
102
+
## Create an Elastic Beanstalk environment
75
103
Create a Java 8 SE environment in Elastic Beanstalk to host the application.
76
104
77
105
*To create an Elastic Beanstalk environment running the Java 8 SE platform*
@@ -91,7 +119,7 @@ When the Scorekeep API runs in AWS Elastic Beanstalk, it uses the permissions of
91
119
3. Select [AmazonDynamoDBFullAccess](https://console.aws.amazon.com/iam/home#policies/arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess) and click **Attach Policy**.
92
120
3. Select [AmazonSNSFullAccess](https://console.aws.amazon.com/iam/home#policies/arn:aws:iam::aws:policy/AmazonSNSFullAccess) and click **Attach Policy**.
93
121
94
-
##Deploy the application
122
+
# Deploy the application
95
123
Deploy the source code for the project to your Elastic Beanstalk environment.
96
124
97
125
*To deploy the source code*
@@ -107,7 +135,7 @@ Deploy the source code for the project to your Elastic Beanstalk environment.
107
135
108
136
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.
109
137
110
-
##Configure Notifications
138
+
# Configure notifications
111
139
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.
112
140
113
141
*To enable notifications*
@@ -217,4 +245,30 @@ When you run both the API and frontend in the same Elastic Beanstalk environment
217
245
218
246
~/eb-java-scorekeep$ git archive -o scorekeep-v1.zip HEAD
219
247
220
-
5. Open your environment's Dashboard in the [Elastic Beanstalk Management Console](console.aws.amazon.com/elasticbeanstalk/home) and deploy the updated code.
248
+
5. Open your environment's Dashboard in the [Elastic Beanstalk Management Console](console.aws.amazon.com/elasticbeanstalk/home) and deploy the updated code.
249
+
250
+
# Contributing
251
+
252
+
This sample application could be better with your help!
253
+
254
+
- Add a new game!
255
+
- Implement game logic in game class. See [TicTacToe.java](https://github.com/awslabs/eb-java-scorekeep/blob/master/src/main/java/scorekeep/TicTacToe.java)
256
+
- Add the class to [RulesFactory.java](https://github.com/awslabs/eb-java-scorekeep/blob/master/src/main/java/scorekeep/RulesFactory.java)
257
+
- Create your own client frontend!
258
+
- Web frameworks - Angular 2, React, ember, etc
259
+
- Mobile app
260
+
- Desktop application
261
+
- Integrate with other AWS services!
262
+
- CICD with CodeCommit, CodePipeline, CodeBuild, and CodeDeploy
263
+
- Analytics with Kinesis, Athena, EMR, or QuickSight
264
+
- Security with VPC
265
+
- Performance with ElastiCache
266
+
- Scalability with CloudFront
267
+
- Portability with ECS or CloudFormation
268
+
- Accessibility with Polly
269
+
- Write tests!
270
+
- Unit tests
271
+
- Integration tests
272
+
- Functional tests
273
+
- Load tests
274
+
- File an [issue](https://github.com/awslabs/eb-java-scorekeep/issues) to report a bug or request new features.
0 commit comments