Skip to content

Commit

Permalink
Merge pull request #2 from osmus/development
Browse files Browse the repository at this point in the history
Merge latest Changes to Main branch
  • Loading branch information
Rub21 authored Sep 23, 2024
2 parents ef5aa15 + 9849b16 commit 6cdbfdc
Show file tree
Hide file tree
Showing 11 changed files with 111 additions and 31 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/chartpress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Chartpress Publish OSM-sandbox images
on:
push:
branches:
- 'main'
- 'staging'
- 'development'
jobs:
build:
runs-on: ubuntu-20.04
timeout-minutes: 120
steps:
- uses: actions/checkout@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_GITHUB_TOKEN }}
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Setup git
run: git config --global user.email "[email protected]" && git config --global user.name "Github Action"
- name: Install Chartpress
run: |
pip install chartpress six ruamel.yaml
- name: Run Chartpress
run: chartpress --push --publish-chart
env:
GITHUB_TOKEN: ${{ secrets.GHCR_GITHUB_TOKEN }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
charts
.DS_Store
values.dev.yaml
.env
.env
tmp/
values.dev.yaml
values.dev.osm.yaml
6 changes: 5 additions & 1 deletion chartpress.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
charts:
- name: osm-sandbox
imagePrefix: ghcr.io/osmus/
repo:
git: osmus/osm-sandbox-deploy
published: https://osmus.github.io/osm-sandbox-deploy
branch: gh-pages
images:
web:
osm-sandbox-web:
valuesPath: osm-seed.web.image
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
env_file:
- ./.env
build:
context: ./images/web
context: ./images/osm-sandbox-web
dockerfile: Dockerfile
ports:
- '80:80'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM developmentseed/osmseed-web:1.0.0-dev.he1070f2
FROM developmentseed/osmseed-web:0.1.0-n791.h1707cdf
ENV workdir /var/www
COPY login.js $workdir/app/assets/javascripts/login.js
RUN rails i18n:js:export assets:precompile
Expand Down
2 changes: 1 addition & 1 deletion images/web/login.js → images/osm-sandbox-web/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $(document).ready(function () {
var queryParams = new URLSearchParams(window.location.search);
var username = queryParams.get("user");
if (username) {
$(".content-heading h1").text("Loging in OpenStreetMap Sandbox ...");
$(".content-heading h1").text("Loging in OpenStreetMap Sandbox");
$("#username").hide();
$("#password").hide();
$("#username").val(username);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -x
## DB restoring
export PGPASSWORD=$POSTGRES_PASSWORD
workdir="/var/www"
curl -o $workdir/osm-sandbox.backup.sql https://osm-sandbox.s3.amazonaws.com/osm-sandbox.backup-fixed.sql
curl -o $workdir/osm-sandbox.backup.sql $BACKUP_FILE_URL

# Function to check if any tables exist in the PostgreSQL database
check_number_of_tables() {
Expand All @@ -20,8 +20,7 @@ while [ "$flag" = true ]; do
flag=false
else
flag=false
sed -i 's/osm-sandbox.org/'"$SERVER_URL"'/g' $workdir/osm-sandbox.backup.sql
sed -i 's/[email protected]/'"$MAILER_FROM"'/g' $workdir/osm-sandbox.backup.sql
sed -i 's/www.hot.boxes.osmsandbox.us/'"$SERVER_URL"'/g' $workdir/osm-sandbox.backup.sql
# Import the SQL backup file into PostgreSQL
psql -h $POSTGRES_HOST -U $POSTGRES_USER -d $POSTGRES_DB -f $workdir/osm-sandbox.backup.sql
fi
Expand Down
6 changes: 3 additions & 3 deletions osm-sandbox/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
apiVersion: v1
name: osm-sandbox-deploy
version: 0.0.1-0.dev.git.6.h74b41c2
version: 0.0.1-0.dev.git.15.hd94fe9b
appVersion: 0.0.1
description: OSM sandbox Deploy Chart
home: https://github.com/GeoCompas/osm-sandbox-deploy
home: https://github.com/osmus/osm-sandbox-deploy
sources:
- https://github.com/GeoCompas/osm-sandbox-deploy
- https://github.com/osmus/osm-sandbox-deploy
kubeVersion: '>=1.15.0-0'
tillerVersion: '>=2.11.0-0'
2 changes: 1 addition & 1 deletion osm-sandbox/requirements.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dependencies:
- name: osm-seed
version: '0.1.0-n791.hef4b2bb'
version: '0.1.0-n791.h1707cdf'
repository: https://devseed.com/osm-seed-chart/
2 changes: 1 addition & 1 deletion osm-sandbox/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ osm-seed:
web:
image:
name: chartpress_replace_me
tag: chartpress_replace_me
tag: chartpress_replace_me
78 changes: 60 additions & 18 deletions values.template.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
osm-seed:
environment: dev
cloudProvider: aws
AWS_S3_BUCKET: 'osm-sandbox'
AWS_S3_BUCKET: 'osmsandbox'
AWS_SSL_ARN: 'none'
serviceType: ClusterIP
createClusterIssuer: false
domain: rub21.staging.osm-sandbox.org
domain: osm.boxes.osmsandbox.us
adminEmail: [email protected]


# ====================================================================================================
# Variables for db
# ====================================================================================================
db:
enabled: true
nodeSelector:
enabled: false
enabled: true
label_key: nodegroup_type
label_value: db
label_value: t3-medium-ondemand
env:
POSTGRES_DB: {{POSTGRES_DB}}
POSTGRES_USER: {{POSTGRES_USER}}
POSTGRES_PASSWORD: {{POSTGRES_PASSWORD}}
POSTGRES_DB: 'openstreetmap'
POSTGRES_USER: 'postgres'
POSTGRES_PASSWORD: '1234'
LOG_STATEMENT: "mod"
persistenceDisk:
enabled: false
Expand All @@ -31,7 +33,7 @@ osm-seed:
resources:
enabled: false
requests:
memory: "10Gi"
memory: "800mi"
cpu: "5"
limits:
memory: "10Gi"
Expand All @@ -43,25 +45,28 @@ osm-seed:
# ====================================================================================================
web:
enabled: true
image:
name: developmentseed/osmseed-web
tag: 1.0.0-dev.he1070f2
# image:
# name: rub21/osm-sandbox-web
# tag: v6
# image:
# name: "developmentseed/osmseed-web"
# tag: "0.1.0-n774.h5f1dfdd"
nodeSelector:
enabled: false
enabled: true
label_key: nodegroup_type
label_value: web
label_value: t3-medium-ondemand
replicaCount: 1
serviceAnnotations:
service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: "300"
ingressDomain: www.rub21.staging.osm-sandbox.org
ingressDomain: www.osm.boxes.osmsandbox.us
env:
MAILER_ADDRESS: 'none'
MAILER_DOMAIN: staging.osm-sandbox.org
MAILER_DOMAIN: osmsandbox.us
MAILER_USERNAME: 'none'
MAILER_PASSWORD: 'none'
OSM_id_key: {{OSM_ID_KEY}}
OAUTH_CLIENT_ID: {{OAUTH_CLIENT_ID}}
OAUTH_KEY: {{OAUTH_KEY}}
OSM_id_key: "none"
OAUTH_CLIENT_ID: "none"
OAUTH_KEY: "none"
MAILER_FROM: [email protected]
NOMINATIM_URL: "none"
OVERPASS_URL: "none"
Expand All @@ -71,6 +76,7 @@ osm-seed:
WEBSITE_STATUS: "online"
# API_TIMEOUT: 600
# WEB_TIMEOUT: 600
BACKUP_FILE_URL: https://osmsandbox.us/backup-fixed.sql
resources:
enabled: false
requests:
Expand All @@ -85,3 +91,39 @@ osm-seed:
maxReplicas: 10
cpuUtilization: 80
sharedMemorySize: 16Mi

# ====================================================================================================
# Variables for memcached. Memcached is used to store session cookies
# ====================================================================================================
memcached:
enabled: true
nodeSelector:
enabled: true
label_key: nodegroup_type
label_value: t3-medium-ondemand
resources:
enabled: false
requests:
memory: "8Gi"
cpu: "2"
limits:
memory: "8Gi"
cpu: "2"

planetDump:
enabled: true
schedule: '* * * * *'
nodeSelector:
enabled: false
label_key: nodegroup_type
label_value: job
env:
OVERWRITE_PLANET_FILE: false
resources:
enabled: false
requests:
memory: "4Gi"
cpu: "2"
limits:
memory: "8Gi"
cpu: "4"

0 comments on commit 6cdbfdc

Please sign in to comment.