Git Product home page Git Product logo

k8s-ddb-cms's Introduction

This is in no way the right way to run this site in kubernetes as the images used is not lightweight etc.

But it is used to learn something about k8s.

Build DDB

docker run --rm -v ${PWD}:/app itkdev/drush6:latest make --concurrency=1 --contrib-destination=profiles/ding2/ --working-copy --force-complete https://raw.githubusercontent.com/ding2/ding2/master/drupal.make htdocs
docker run --rm -v ${PWD}/htdocs:/app -it node:6 /bin/bash -c "cd /app/profiles/ding2/themes/ddbasic/ && npm install"
docker run --rm -v ${PWD}/htdocs:/app -it node:6 /bin/bash -c "cd /app/profiles/ding2/themes/ddbasic/ && node_modules/.bin/gulp uglify sass"
rm -rf htdocs/profiles/ding2/themes/ddbasic/node_modules

Build php application container

docker build --tag=itkdev/ddb-cms .
docker push itkdev/ddb-cms

Deployment

Change the default namespace so you don't have to have --namespace=ddbcms on every kubectl command.

kubectl apply -f k8s/ddbcms-namespace.yaml
kubectl config set-context --current --namespace=ddbcms

Start the deployment.

kubeclt apply -f ddbcms-pvc.yaml -f ddbcms-database.yaml -f ddbcms-deployment.yaml -f ddbcms-nginx-deployment.yaml 
kubectl create secret generic ddbcms --from-literal=password="db" --from-literal=username="db"

Hacks

You might need to go into the ddbcms pod(s) and install drush and do a drush cgen to make DDB CMS generate the theme corretly to be able to login.

kubectl exec -it <POD NAME> -- /bin/bash

k8s-ddb-cms's People

Contributors

cableman avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.