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
@@ -36,9 +36,11 @@ In [`application-pgsql.properties`](https://github.com/awslabs/eb-java-scorekeep
36
36
Hibernate also calls the database during application startup. No segment is available to the X-Ray SDK during startup, so we create one manually in [`RdsWebConfig.java`](https://github.com/awslabs/eb-java-scorekeep/blob/xray/src/main/java/scorekeep/RdsWebConfig.java#L83) by overriding Hibernate's `SchemaExport` class.
37
37
38
38
# Scorekeep
39
-
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.
39
+
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.
40
40
41
-
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.
41
+
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.
42
+
43
+
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.
42
44
43
45
**Branches**
44
46
-[`cognito`](https://github.com/awslabs/eb-java-scorekeep/tree/cognito) - Support login and store users in a Cognito user pool.
@@ -47,9 +49,35 @@ The project shows the use of Spring, Angular, nginx, the AWS SDK for Java, Dynam
47
49
-[`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.
48
50
-[`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).
49
51
50
-
Use the procedures in the following sections to run the project on AWS Elastic Beanstalk and configure it for local testing and development.
52
+
Use the procedures in the following sections to run the project on AWS Elastic Beanstalk and configure it for local testing and development.
53
+
54
+
**Sections**
55
+
-[Prerequisites](#prerequisites)
56
+
-[Deploy the application](#deploy-the-application)
-[Running the project locally](#running-the-project-locally)
60
+
-[Contributing](#contributing)
61
+
62
+
# Prerequisites
63
+
- User permissions - Elastic Beanstalk, IAM*
64
+
- Instance profile with permission to use DynamoDB and SNS
65
+
- Elastic Beanstalk environment running Java 8
66
+
67
+
*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.
68
+
69
+
## Get permission to use Elastic Beanstalk
70
+
If you are using an IAM user with limited permissions, good work! Add Elastic Beanstalk permissions to your user account to get started.
71
+
72
+
*To add Elastic Beanstalk permissions to an IAM user*
73
+
74
+
1. Sign in to a user or role with administrator permissions.
75
+
2. Open the [users page](https://console.aws.amazon.com/iam/home#/users) of the IAM console.
76
+
3. Choose a user.
77
+
4. Click **Add permissions**.
78
+
5. Add the **AWSElasticBeanstalkFullAccess** managed policy.
51
79
52
-
## Create an AWS Elastic Beanstalk environment
80
+
## Create an Elastic Beanstalk environment
53
81
Create a Java 8 SE environment in Elastic Beanstalk to host the application.
54
82
55
83
*To create an Elastic Beanstalk environment running the Java 8 SE platform*
@@ -69,7 +97,7 @@ When the Scorekeep API runs in AWS Elastic Beanstalk, it uses the permissions of
69
97
3. Select [AmazonDynamoDBFullAccess](https://console.aws.amazon.com/iam/home#policies/arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess) and click **Attach Policy**.
70
98
3. Select [AmazonSNSFullAccess](https://console.aws.amazon.com/iam/home#policies/arn:aws:iam::aws:policy/AmazonSNSFullAccess) and click **Attach Policy**.
71
99
72
-
##Deploy the application
100
+
# Deploy the application
73
101
Deploy the source code for the project to your Elastic Beanstalk environment.
74
102
75
103
*To deploy the source code*
@@ -85,7 +113,7 @@ Deploy the source code for the project to your Elastic Beanstalk environment.
85
113
86
114
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.
87
115
88
-
##Configure Notifications
116
+
# Configure notifications
89
117
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.
90
118
91
119
*To enable notifications*
@@ -195,4 +223,30 @@ When you run both the API and frontend in the same Elastic Beanstalk environment
195
223
196
224
~/eb-java-scorekeep$ git archive -o scorekeep-v1.zip HEAD
197
225
198
-
5. Open your environment's Dashboard in the [Elastic Beanstalk Management Console](console.aws.amazon.com/elasticbeanstalk/home) and deploy the updated code.
226
+
5. Open your environment's Dashboard in the [Elastic Beanstalk Management Console](console.aws.amazon.com/elasticbeanstalk/home) and deploy the updated code.
227
+
228
+
# Contributing
229
+
230
+
This sample application could be better with your help!
231
+
232
+
- Add a new game!
233
+
- Implement game logic in game class. See [TicTacToe.java](https://github.com/awslabs/eb-java-scorekeep/blob/master/src/main/java/scorekeep/TicTacToe.java)
234
+
- Add the class to [RulesFactory.java](https://github.com/awslabs/eb-java-scorekeep/blob/master/src/main/java/scorekeep/RulesFactory.java)
235
+
- Create your own client frontend!
236
+
- Web frameworks - Angular 2, React, ember, etc
237
+
- Mobile app
238
+
- Desktop application
239
+
- Integrate with other AWS services!
240
+
- CICD with CodeCommit, CodePipeline, CodeBuild, and CodeDeploy
241
+
- Analytics with Kinesis, Athena, EMR, or QuickSight
242
+
- Security with VPC
243
+
- Performance with ElastiCache
244
+
- Scalability with CloudFront
245
+
- Portability with ECS or CloudFormation
246
+
- Accessibility with Polly
247
+
- Write tests!
248
+
- Unit tests
249
+
- Integration tests
250
+
- Functional tests
251
+
- Load tests
252
+
- File an [issue](https://github.com/awslabs/eb-java-scorekeep/issues) to report a bug or request new features.
0 commit comments