Skip to content

Commit

Permalink
Merge pull request #106 from defold/stage-instance
Browse files Browse the repository at this point in the history
Stage instance for testing purposes
  • Loading branch information
nasthu authored Oct 12, 2018
2 parents 1d97b4f + 9b4e717 commit 50c918b
Show file tree
Hide file tree
Showing 9 changed files with 89 additions and 81 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "server/scripts/shared"]
path = server/scripts/shared
url = https://github.com/defold/aws-build-tools
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ This describes how to run the build server locally.

### Prerequisites
* Make sure you have [Docker](https://www.docker.com) installed and running.
* Clone this repo with the _recurse-submodules_ parameter:
* git clone --recurse-submodules <repo>
* If you have already cloned the repo, you can init and fetch the submodule like this:
* git submodule init
* git submodule update

### Build
* First, build the Extender Docker image by running: `./server/scripts/build.sh`
Expand Down
7 changes: 7 additions & 0 deletions server/scripts/publish-prod.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash -e

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

source ${DIR}/shared/publi.sh

publish extender prod
7 changes: 7 additions & 0 deletions server/scripts/publish-stage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash -e

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

source ${DIR}/shared/publi.sh

publish extender stage
41 changes: 0 additions & 41 deletions server/scripts/publish.sh

This file was deleted.

1 change: 1 addition & 0 deletions server/scripts/shared
Submodule shared added at e9d930
32 changes: 32 additions & 0 deletions server/scripts/task-definition-template-stage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"family": "extender",
"containerDefinitions": [
{
"image": "%IMAGE%",
"name": "extender",
"cpu": 10,
"memory": 2048,
"essential": true,
"portMappings": [
{
"containerPort": 9000
}
],
"environment": [
{
"name": "SPRING_PROFILES_ACTIVE",
"value": "stage"
}
],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "stage-logs",
"awslogs-region": "eu-west-1",
"awslogs-stream-prefix": "extender",
"awslogs-datetime-format": "%Y-%m-%d %H:%M:%S"
}
}
}
]
}
74 changes: 34 additions & 40 deletions server/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,68 +4,62 @@ server:

extender:
sdk-location: /var/extender/sdk
sdk-cache-size: 10 # Slightly bigger than production in order to not remove version controlled SDK
# Slightly bigger than production in order to not remove version controlled SDK
sdk-cache-size: 10
build-location: /var/extender/builds
server:
http:
idle-timeout: 600000
data-store:
url: "http://localhost:9017"
file-size-threshold: 110000
file-size-threshold: 110000

spring.http.multipart.max-file-size: 500mb
spring.http.multipart.max-request-size: 500mb
spring.http.multipart.enabled: false

# Don't check for templates on startup.
spring.mustache.check-template-location: false
spring:
http:
multipart:
enabled: false
max-file-size: 500mb
max-request-size: 500mb
# Don't check for templates on startup
mustache:
check-template-location: false

# All management endpoints except simple health status are disabled for security reasons.
# All management endpoints except simple health status are disabled for security reasons
endpoints:
enabled: false
health:
enabled: true
sensitive: false
enabled: false
health:
enabled: true
sensitive: false

# Suppress info-logging from metrics reporting client
logging.level.okhttp3.OkHttpClient: WARN

management:
health.diskspace.path: /
health.diskspace.threshold: 524288000 #500mb
health:
diskspace:
path: /
threshold: 524288000 #500mb

---

spring:
profiles: production

server:
port: 9000
profiles: stage

extender:
sdk-location: /var/extender/sdk
sdk-cache-size: 5
build-location: /var/extender/builds
server:
http:
idle-timeout: 600000
data-store:
url: "http://localhost:9017"
file-size-threshold: 110000

spring.http.multipart.max-file-size: 500mb
spring.http.multipart.max-request-size: 500mb
spring.http.multipart.enabled: false
endpoints:
health:
sensitive: true

# Don't check for templates on startup.
spring.mustache.check-template-location: false
---

# All management endpoints except simple health status are disabled for security reasons.
endpoints:
enabled: false
health:
enabled: true
sensitive: true
spring:
profiles: production

# Suppress info-logging from metrics reporting client
logging.level.okhttp3.OkHttpClient: WARN
extender:
sdk-cache-size: 5

endpoints:
health:
sensitive: true

0 comments on commit 50c918b

Please sign in to comment.