Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add a custom theme to edxapp LMS #105

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion apps/edxapp/templates/cms/_dc_base.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ spec:
value: {{ service_variant }}
- name: DJANGO_SETTINGS_MODULE
value: {{ service_variant }}.envs.fun.docker_run
image: "{{ edxapp_image_name }}:{{ edxapp_image_tag }}"
image: ""
imagePullPolicy: IfNotPresent
volumeMounts:
- mountPath: /config
Expand Down Expand Up @@ -115,3 +115,12 @@ spec:
- name: edxapp-v-data
persistentVolumeClaim:
claimName: edxapp-pvc-data
triggers:
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- "{{ service_variant }}"
from:
kind: ImageStreamTag
name: "augmented-{{ edxapp_image_name }}:{{ edxapp_image_tag }}"
30 changes: 30 additions & 0 deletions apps/edxapp/templates/lms/bc.yml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: "v1"
kind: "BuildConfig"
metadata:
name: "edxapp-lms"
labels:
app: "edxapp"
service: "lms"
spec:
strategy:
dockerStrategy:
source:
{% if edxapp_theme_url is defined and edxapp_theme_url %}
git:
uri: "{{ edxapp_theme_url }}"
ref: "{{ edxapp_theme_tag | default("master") }}"
sourceSecret:
name: "edxapp_theme_ssh_key"
{% endif %}
dockerfile: |-
FROM {{ edxapp_image_name }}:{{ edxapp_image_tag }}
USER 0
{% if edxapp_theme_url is defined and edxapp_theme_url %}
COPY . /edx/app/edxapp/edx-platform/themes/custom-theme
NO_PREREQ_INSTALL=1 DEFAULT_SITE_THEME="custom-theme" paver update_assets --settings={{ edxapp_build_settings }} --skip-collect
Copy link
Contributor Author

@sampaccoud sampaccoud Aug 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jmaupetit in fact, I think it might not be required to set DEFAULT_SITE_THEME since "update_assets" builds all the themes in the themes directory...
Maybe try removing it as it would be simpler... and we wouldn't need to modify the build settings in fun-platform like I did...

{% endif %}
USER 10000
output:
to:
kind: "ImageStreamTag"
name: "augmented-{{ edxapp_image_name }}:{{ edxapp_image_tag }}"
7 changes: 7 additions & 0 deletions apps/edxapp/templates/lms/is.yml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: "v1"
kind: "ImageStream"
metadata:
name: "augmented-{{ edxapp_image_name }}"
labels:
app: "edxapp"
service: "lms"
3 changes: 3 additions & 0 deletions apps/edxapp/vars/all/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ edxapp_image_name: "fundocker/edxapp"
edxapp_image_tag: "ginkgo.1-1.0.6"
edxapp_django_port: 8000
edxapp_sql_dump_url: "https://gist.github.com/jmaupetit/1f9d270d7d2106774fd94ba89a51ab78/raw/b0004f2825623d03de58710bf936db175e96bc90/edx-database-ginko.sql"
edxapp_theme_url: "git@git.alt.openfun.fr:openfun/cnfpt.git"
edxapp_theme_tag: "master"
edxapp_build_settings: "fun.docker_build_production"

# -- memcached
edxapp_memcached_image_name: memcached
Expand Down