From 80bd62785a316268849e0ad7bd14d9f3540fa543 Mon Sep 17 00:00:00 2001 From: danialmalik Date: Tue, 3 Sep 2019 11:10:59 +0500 Subject: [PATCH] Update Readme, Change provision.sh: remove wordpress provision --- README.rst | 64 ++++++++++++------------------------------ provision-wordpress.sh | 21 +++++++------- provision.sh | 1 - 3 files changed, 29 insertions(+), 57 deletions(-) diff --git a/README.rst b/README.rst index 60be80fd43..b44d82d6d2 100644 --- a/README.rst +++ b/README.rst @@ -6,7 +6,7 @@ Get up and running quickly with Open edX services. Prerequisites ------------- -This project requires **Docker 17.06+ CE**. We recommend Docker Stable, but +This project requires `DockerCE`_ **17.06+**. We recommend Docker Stable, but Docker Edge should work as well. You will also need the following installed: @@ -18,13 +18,13 @@ You will also need the following installed: Getting Started --------------- -All of the services can be run by following the steps below. +All of the services can be run by following the steps below. 1. Create a new vitualenv using the following command. Install virtualenv using "pip install virtualenv" if dnt have it. .. code:: sh - virtualenv devstack-env () + virtualenv devstack-env 2. Activate the virtualenv @@ -38,11 +38,12 @@ All of the services can be run by following the steps below. make requirements -4. Check if env variable "OPENEDX_RELEASE" is already set using (update the value to 'hawthorn.master' if set to a different value)(if first time installation use the following command to set the variable) +4. Check if env variable "OPENEDX_RELEASE" is already set using (update the value to 'hawthorn.master' if set to a different value)(if first time installation use the following command to set the variable) .. code:: sh echo "export OPENEDX_RELEASE=hawthorn.master" >> ~/.bashrc && source ~/.bashrc + Note* : for mac you can exter the value in .bash_profie 5. Clone the all the service repos @@ -51,58 +52,28 @@ All of the services can be run by following the steps below. make dev.clone -6. Check if you have any existing edX images - - .. code:: sh - - docker ps -a --filter "name=edx" - -7. Check if you have any existing wordpress - - .. code:: sh - - docker ps -a --filter "name=wordpress" - -8. Remove all existing edX images if there are any - - .. code:: sh - - docker rmi $(docker images |grep 'edx') - -9. Remove all existing wordpress images if there are any. - - .. code:: sh - - docker rmi $(docker images |grep 'wordpress') - -10. just to make sure :). - - .. code:: sh - - make destroy - -11. Pull the latest Images. +6. Pull the latest Images. .. code:: sh make pull -12. Run the provisions. +7. Run the provisions. .. code:: sh make dev.provision - - Run for WordPress plugins setup - - ./provision-wordpress.sh -13. Run the devstack. +8 Run the devstack. .. code:: sh make dev.up - + +9. Run the wordpress provision + .. code:: sh + + ./provision-wordpress.sh After the services have started, if you need shell access to one of the @@ -222,11 +193,11 @@ do the following stuff. .. code:: sh apt-get update - + Note* : If you are facing some uploading images issues on mac go to wordpress shell and set appropriate permissions for uploads folder (ie, "chown www-data:www-data -R uploads") - -Note** : If you are facing some home page issues with elementor. Go to elementor wordpress setting and hard code the default values and save. - + +Note** : If you are facing some home page issues with elementor. Go to elementor wordpress setting and hard code the default values and save. + Useful Commands --------------- @@ -879,6 +850,7 @@ GitHub issue which explains the `current status of implementing delegated consis .. _Docker Compose: https://docs.docker.com/compose/ .. _Docker for Mac: https://docs.docker.com/docker-for-mac/ .. _Docker for Windows: https://docs.docker.com/docker-for-windows/ +.. _DockerCE: https://docs.docker.com/install/linux/docker-ce/ubuntu/ .. _Docker Sync: https://github.com/EugenMayer/docker-sync/wiki .. _Docker Sync installation instructions: https://github.com/EugenMayer/docker-sync/wiki/1.-Installation .. _cached consistency mode for volume mounts: https://docs.docker.com/docker-for-mac/osxfs-caching/ diff --git a/provision-wordpress.sh b/provision-wordpress.sh index 098fdd86bf..cc120bc1c4 100755 --- a/provision-wordpress.sh +++ b/provision-wordpress.sh @@ -1,3 +1,4 @@ +#!/bin/bash set -e set -o pipefail set -x @@ -7,13 +8,13 @@ docker exec -t edx.devstack.wordpress bash -c 'cd wp-content/plugins/ && rm -rf echo -e "${GREEN} Install required Plugins...${NC}" docker exec -t edx.devstack.wordpress bash -c ' -cd wp-content/plugins/ && curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && -php wp-cli.phar plugin install advanced-custom-fields --activate --allow-root && -php wp-cli.phar plugin install edunext-openedx-integrator --activate --allow-root && -php wp-cli.phar plugin install elementor --activate --allow-root && +cd wp-content/plugins/ && curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && +php wp-cli.phar plugin install advanced-custom-fields --activate --allow-root && +php wp-cli.phar plugin install edunext-openedx-integrator --activate --allow-root && +php wp-cli.phar plugin install elementor --activate --allow-root && php wp-cli.phar plugin install classic-editor --activate --allow-root && -php wp-cli.phar plugin install contact-form-7 --activate --allow-root && -php wp-cli.phar plugin install mailchimp-for-wp --activate --allow-root && +php wp-cli.phar plugin install contact-form-7 --activate --allow-root && +php wp-cli.phar plugin install mailchimp-for-wp --activate --allow-root && php wp-cli.phar plugin install all-in-one-wp-migration --allow-root && php wp-cli.phar plugin activate edly-wp-plugin --allow-root && rm -rf wp-cli.phar && @@ -27,14 +28,14 @@ chown www-data:www-data -R all-in-one-wp-migration' echo -e "${GREEN} Enable edly-wp-theme...${NC}" docker exec -t edx.devstack.wordpress bash -c ' -cd wp-content/themes/ && curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && -php wp-cli.phar theme get edly-wp-theme --allow-root && -php wp-cli.phar theme activate edly-wp-theme --allow-root && +cd wp-content/themes/ && curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && +php wp-cli.phar theme get edly-wp-theme --allow-root && +php wp-cli.phar theme activate edly-wp-theme --allow-root && rm -rf wp-cli.phar ' echo -e "${GREEN} Update Wordpress Configurations...${NC}" docker exec -t edx.devstack.wordpress bash -c " -curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && +curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && php wp-cli.phar config set 'DISCOVERY_API_URL' 'http://edx.devstack.discovery:18381/api/v1' --allow-root && php wp-cli.phar config set 'LMS_BASE_URL' 'http://edx.devstack.lms:18000' --allow-root && php wp-cli.phar config set 'ENROLLMENT_API_URL' 'http://edx.devstack.lms:18000/api/enrollment/v1' --allow-root && diff --git a/provision.sh b/provision.sh index b09dd1decc..8324ff18dc 100755 --- a/provision.sh +++ b/provision.sh @@ -48,7 +48,6 @@ docker-compose $DOCKER_COMPOSE_FILES up -d studio ./provision-e2e.sh ./provision-forum.sh ./provision-notes.sh -./provision-wordpress.sh docker image prune -f