Pre-requisites
Get these things before you start:
Instructions
pgAdmin, the Postgres management tools, should have been installed with the Postgres installer. Use pgAdmin to create a database named awsed. Don't worry about creating the tables, they are created the first time the application runs.
Clone the AWS Educate git repository. Import the project into Eclipse using File -> Import -> Existing Maven Projects.
Create a Spring Boot configuration file named application-default.yml. Put it in the src\main\resources folder. Fill in the Amazon credentials and database information.
aws:
account: SECRET
accessKeyId: SECRET
secretKey: SECRET
testing:
enabled: true
username: admin
spring:
datasource:
url: jdbc:postgresql://localhost/awsed
username: postgres
password: SECRET
driver-class-name: org.postgresql.Driver
Find the class EcmApplication in the /src/main/java/edu/ucsd/ecm/web folder (pro-tip: use CTRL+SHIFT+T).
Right-click the EcmApplication file and choose Run As -> Java program.
Assuming there were no errors, the database schema is created now. Run this script in pgAdmin to add a user named admin:
insert into "user" (user_id, name) values ('5e21e9b6-5798-40c8-aea1-96fd844f4bbb', 'admin');
insert into user_role (user_id, role) values ('5e21e9b6-5798-40c8-aea1-96fd844f4bbb', 'ROLE_ADMIN');
Browse to http://localhost:8080/courses.
These configuration options are available. When using YAML configuration use indentation instead of periods.
Refer to the Spring Boot documentation for further details.
| Property | Description |
|---|---|
testing.enabled | (true or false) If true then the REMOTE_USER header is forced testing.username |
testing.username | User to impersonate |
spring.datasource.url | JDBC connection string, e.g. jdbc:postgresql://localhost:5432/awsed |
spring.datasource.username | Database user |
spring.datasource.password | Database user's password |
spring.datasource.driver-class-name | JDBC driver class to use, e.g. org.postgresql.Driver |
scheduler.enabled | Set to false to disable scheduled tasks |
--add-opens java.base/java.lang=ALL-UNNAMEDThese plugins are optional. Get them from the Eclipse Marketplace.
There are two drivers:
By default the HtmlUnit driver is used so you won't see any output. To use chrome set:
-Dwebdriver.factory=edu.ucsd.ecm.web.controller.ChromeWebDriverFactory
as the command line argument to the test in eclipse.
Also make sure chromedriver is installed in c:\windows\system32 or other path that can be found by selenium.
https://chromedriver.chromium.org/downloads
#mvn --batch-mode release:update-versions -DdevelopmentVersion=1.2.0-SNAPSHOT -DautoVersionSubmodules=true -DgenerateBackupPoms=false mvn --batch-mode versions:set -DnewVersion=2022.2.1-RC2 -DgenerateBackupPoms=false
Content type
Image
Digest
sha256:6c925175e…
Size
499.6 MB
Last updated
about 2 years ago
docker pull ucsdets/aws-educate:release-2024.4.0