Skip to content

Commit 1771e01

Browse files
authored
Merge pull request #58 from PatternAtlas/addDeploymentModelingFlags
Add deployment modeling flags
2 parents cc5492d + 74cd190 commit 1771e01

File tree

5 files changed

+36
-25
lines changed

5 files changed

+36
-25
lines changed

.docker/docker-compose.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
version: '3'
22
services:
33
db:
4-
image: postgres:10
4+
image: postgres:15
55
environment:
6-
POSTGRES_USER: postgres
7-
POSTGRES_PASSWORD: postgres
8-
POSTGRES_DB: postgres
6+
POSTGRES_USER: patternatlas
7+
POSTGRES_PASSWORD: patternatlas
8+
POSTGRES_DB: patternatlas
99
ports:
10-
- "5432:5432"
10+
- "5060:5432"
1111
networks:
1212
- default
1313
networks:

docs/dev/index.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,22 @@ This is achieved through using the OAuth 2.0 Authentication Code Flow, additiona
99
It runs on Port 8081
1010

1111
### Development
12-
1. Clone the repository `git clone https://github.com/PatternAtlas/pattern-pedia-auth.git`.
13-
2. Navigate to repository directory `cd pattern-pedia-auth/`.
14-
2. Build the repository
15-
- `mvn package -DskipTests`(Windows) (skiping the tests for a faster build), Java 8 required.
16-
- `./mvnw clean package -DskipTests`(Unix) (skiping the tests for a faster build), Java 8 required.
17-
#### Docker Installation
18-
3. Build the image `docker build -t patternpedia/auth .` ([Docker](https://docs.docker.com/get-docker/) required)
19-
20-
##### Auth & DB
21-
4. Navigate to directory `..\.docker\`
22-
5. Insert the following commands `docker-compose -f docker-compose-with-db.yml up -d`
23-
24-
##### Auth
25-
4. Navigate to directory `..\.docker\`
26-
5. Insert the following commands `docker-compose up -d`
12+
13+
1. Run the maven build `mvn package -DskipTests`
14+
2. Clone the contents repository `git clone https://github.com/PatternAtlas/pattern-atlas-content`.
15+
3. Clone the Docker repository `git clone https://github.com/PatternAtlas/pattern-atlas-docker`
16+
4. Setup IntelliJ to also use the contents repository in the deployment. :warning: you MUST use the _Applicaition_ run configuration, not _Spring Boot_!
17+
![Run-Configuration](IntelliJ-run-config.png)
18+
5. Start the development configuration using docker compose:
19+
1. Change into the docker compose repository
20+
2. Run the following command `docker-compose -f docker-compose.dev.yml up -d`
21+
6. Run the Pattern Atlas using IntelliJ
22+
7. Go to <http://localhost:7080/> and login with user admin and password admin
23+
8. Add a user by ONLY specifying her name
24+
9. Afterwards, under the _Credentials_ tab, you can set a password for this user. Make sure to set the `Temporary` flag to `false`!
25+
10. Start the UI (either using Docker or local setup)
26+
11. Go to <http://localhost:1978> and login. The first user is automatically assigned to the ADMIN role.
27+
2728

2829
#### IntelliJ
2930
3. [Follow PatternAtlasAPI from Step 5 pls](#step5)

src/main/java/io/github/patternatlas/api/entities/Pattern.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,10 @@ public class Pattern extends EntityWithURI {
4646
@Type(type = "jsonb")
4747
@Column(columnDefinition = "jsonb")
4848
private Object renderedContent;
49+
50+
@Column(columnDefinition = "boolean default false")
51+
private Boolean deploymentModelingStructurePattern;
52+
53+
@Column(columnDefinition = "boolean default false")
54+
private Boolean deploymentModelingBehaviorPattern;
4955
}

src/main/java/io/github/patternatlas/api/rest/model/PatternModel.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import java.util.UUID;
44

55
import com.fasterxml.jackson.annotation.JsonIgnore;
6-
76
import io.github.patternatlas.api.entities.Pattern;
87
import io.github.patternatlas.api.entities.PatternLanguage;
98
import lombok.Data;
@@ -27,6 +26,9 @@ public class PatternModel {
2726

2827
protected String patternLanguageName;
2928

29+
private Boolean deploymentModelingBehaviorPattern;
30+
private Boolean deploymentModelingStructurePattern;
31+
3032
@JsonIgnore
3133
protected Pattern pattern;
3234

@@ -39,6 +41,8 @@ private PatternModel(Pattern pattern) {
3941
PatternLanguage patternLanguage = pattern.getPatternLanguage();
4042
this.patternLanguageId = patternLanguage.getId();
4143
this.patternLanguageName = patternLanguage.getName();
44+
this.deploymentModelingBehaviorPattern = pattern.getDeploymentModelingBehaviorPattern();
45+
this.deploymentModelingStructurePattern = pattern.getDeploymentModelingStructurePattern();
4246
}
4347

4448
public static PatternModel from(Pattern pattern) {

src/main/resources/application.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
server.port=1977
2-
spring.datasource.url=jdbc:postgresql://localhost:5432/patternatlas
2+
spring.datasource.url=jdbc:postgresql://localhost:5060/patternatlas
33
spring.datasource.username=patternatlas
44
spring.datasource.password=patternatlas
55
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
@@ -12,7 +12,7 @@ springdoc.default-produces-media-type=application/hal+json
1212
# alt: AUTH-Server
1313
# security.oauth2.resource.jwk.key-set-uri=http://localhost:8081/.well-known/jwks.json
1414
# neu: Keycloak
15-
security.oauth2.resource.jwk.key-set-uri=http://localhost:8080/realms/patternatlas/protocol/openid-connect/certs
15+
security.oauth2.resource.jwk.key-set-uri=http://localhost:7080/realms/patternatlas/protocol/openid-connect/certs
1616
#okta.oauth2.issuer=https://dev-918271.okta.com/oauth2/default
1717
#okta.oauth2.clientId=0oa1eflyl1wZDVLLg357
1818
#----------------------------
@@ -23,7 +23,7 @@ io.github.patternatlas.api.latexrenderer.port=5030
2323
# Embedded Tomcat
2424
server.servlet.contextPath=/patternatlas
2525
# liquibase file
26-
spring.liquibase.change-log=patternatlas.xml
26+
spring.liquibase.change-log=patternatlas_full.xml
2727
# DB debug logs
2828
spring.jpa.show-sql=false
29-
spring.jpa.properties.hibernate.show_sql=false
29+
spring.jpa.properties.hibernate.show_sql=false

0 commit comments

Comments
 (0)