Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
Updates docs
Browse files Browse the repository at this point in the history
  • Loading branch information
acouch committed Oct 25, 2016
1 parent a72fcb4 commit f5cfa66
Show file tree
Hide file tree
Showing 27 changed files with 413 additions and 73 deletions.
9 changes: 4 additions & 5 deletions docs/common_tasks/add-client-custom-config.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Add client custom configuration
# Add custom configuration

By custom configuration we mean:

* A new Content Type
* A new View
* A new Page
* Whatever can be captured in features in a custom module

Whatever's you need to customise the project, you should set the feature export
Whatever's you need to customise the project, you should set the feature export
to somewhere inside the **docroot/sites/all/modules/custom** folder. That way,
your module will **persist** when the site gets **remade** (Read Add a custom
module if you don't understand what this means).
Expand All @@ -17,6 +19,3 @@ However, there's a few caveats:
2. Create a behat feature file for your tests (name it appropriately)
3. Look at the **circle.yml** recipe to see if it's setup to run that behat feature
2. **Customisation** does not mean in any way **DKAN overrides.** If you plan to introduce overrides please refer to Override a DKAN oobb feature



12 changes: 6 additions & 6 deletions docs/common_tasks/add-contrib-library.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@

Whenever you want to add a library you need to guarantee two specific conditions:

1. The module needs to be added to the **codebase**
1. The module needs to be added to the **codebase**
2. The module needs to be added to the project's **make file** so if the website gets rebuild (for instance when dkan get's updated), the module remains in the **codebase** and doesn't get deleted

Let's say, for instance, that we want to add the [Angular](https://github.com/angular/angular) module to the project.
Let's say, for instance, that we want to add the [Angular](https://github.com/angular/angular) module to the project.

# Add the module to the custom_libs.make file
Add the folowing line to custom.make
## Add the module to the custom_libs.make file
Add the folowing line to custom.make
```
# Angular
libraries[angular][type] = libraries
libraries[angular][download][type] = git
libraries[angular][download][url] = "https://github.com/angular/angular.git"
libraries[angular][download][tag] = "2.0.0"
```
# Add to the project
Run:
## Add to the project
Run:
```
ahoy build custom-libs
```
Expand Down
7 changes: 4 additions & 3 deletions docs/common_tasks/add-contrib-module.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# Add a contributed module

As we stated in the [Add a custom module guide](https://github.com/NuCivic/data_starter_private/blob/civic4252_make-files-public/docs/common_tasks/add-custom-module.md), whenever you want to add a module (no matter if it's custom or not) you need to guarantee two specific conditions:

1. The module needs to be added to the **codebase**
2. The module needs to be added to the project's **make file** so if the website gets rebuild (for instance when dkan get's updated), the module remains in the **codebase** and doesn't get deleted

Let's say, for instance, that we want to add the [ShareThis](https://www.drupal.org/project/sharethis) module to the project.
Let's say, for instance, that we want to add the [ShareThis](https://www.drupal.org/project/sharethis) module to the project.

## Add the module to the custom.make file
Add the following line to the cusmom.make
Add the following line to the cusmom.make
```
projects[] = sharethis
```
Expand All @@ -23,7 +24,7 @@ $features_master = data_config_enabled_modules();
$features_master['modules']['sharethis'] = 'sharethis',
```
## Remake the project
Run:
Run:
```
ahoy build custom
```
Expand Down
5 changes: 3 additions & 2 deletions docs/common_tasks/add-custom-behat-test.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Add a Custom Behat Test
Sometimes a site will require a feature that will never be part of the upstream product. In these cases you will need to add a site specific behat tests to your site repo. This page documents how to do that.

## Step-by-step guide
1. Add any new feature tests to the config/tests/features folder.
2. If a new context that cannot be merged into nucivic/dkanextension is needed, add it to the config/tests/feature/bootstrap folder (see example in info block below).
Expand All @@ -13,9 +14,9 @@ config/tests/features/
| |-- FeatureContext.php
|-- custom.feature
```
### Example Test:
### Example Test:
#### config/tests/features/custom.feature
```
```
Feature: Custom Example
@api
Scenario: See custom about page
Expand Down
1 change: 1 addition & 0 deletions docs/common_tasks/add-custom-module.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Add a custom module

Add custom modules to **config/modules/custom**
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Build a "Contributed" or "DKAN" Module in a Client Project

## Workflow
The best workflow for this is to:

Expand All @@ -13,21 +14,21 @@ The best workflow for this is to:
1. When you are ready to reflect that local changes in the client repo update the reference in custom.make
2. run **ahoy build custom**
1. Changes should then appear in the module in **docroot/sites/all/modules/contrib**
## Example

## Example
Lets say you are working on a module which adds [hover-bear](http://fakeplus.com/pictures/jpg/-hover-bear_20120503062245.jpg) functionality to a client project and the module lives at http://github.com/nucivic/dkan_hover_bears.

1. **Add the module**
1. The **custom.make** file should include:
```
1. The **custom.make** file should include:

```
projects[dkan_dkan_hover_bears][type] = module
projects[dkan_dkan_hover_bears][download][type] = git
projects[dkan_dkan_hover_bears][download][type] = git
projects[dkan_dkan_hover_bears][download][url] = https://github.com/NuCivic/dkan_dkan_hover_bears.git
projects[dkan_dkan_hover_bears][download][revision] = 0c57133a4fb8c26cd03ee7607ebd7f983b853b8c
```
2. Note the **revision**. You can include branch during development but it is safer to use a commit. Using the a branch look like:
```
projects[dkan_dkan_hover_bears][type] = module
projects[dkan_dkan_hover_bears][download][type] = git
Expand Down
2 changes: 2 additions & 0 deletions docs/common_tasks/change-local-container-settings.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Change local container settings (PHP Memory for Example)

#### Update php {{memory_limit}}:

1. Locate the php.ini file used for the ahoy based dkan setup, usually dkan/.ahoy/.docker/etc/php5/php.ini
2. Edit the file to set the memory_limit php variable to the needed value, for example (512M, -1 for unlimited).
3. We need to restart the docker containers. ahoy docker stop;; ahoy docker up
1 change: 1 addition & 0 deletions docs/common_tasks/config-secure-pages.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Configure Secure Pages

Secure pages is useful as in interim solution until we get "HTTPs Everywhere" support.

To setup secure pages properly:
Expand Down
2 changes: 1 addition & 1 deletion docs/common_tasks/enable-fast-file-import.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Enable Fast File Import
# Enable Fast File Import

To enable fast file import add:

Expand Down
48 changes: 45 additions & 3 deletions docs/common_tasks/index.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,53 @@
Common Development Tasks
----------------------
------------------------

These are common development tasks throughout the lifecycle of a project.

Add or Update Modules, Themes or libraries
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* :doc:`add-client-custom-config`
* :doc:`add-contrib-library`
* :doc:`add-contrib-module`
* :doc:`add-custom-module`
* :doc:`build-contrib-or-dkan-module-a-client-project`
* :doc:`patching-or-overriding-dkan`
* :doc:`update-a-contrib-module`
* :doc:`update-data-starter`
* :doc:`update-to-latest-dkan`

Testing & QA
~~~~~~~~~~~~
* :doc:`add-custom-behat-test`
* :doc:`run-tests-locally`
* :doc:`override-and-upstream-behat-suite-config`
* :doc:`getting-content-into-a-probo-site`

Deployment
~~~~~~~~~~
* TODO: update deployment
* :doc:`temp-disable-module-in-environment`

Configuration
~~~~~~~~~~~~~
* :doc:`config-secure-pages`
* :doc:`enable-fast-file-import`
* :doc:`enable-https-everywhere`
* :doc:`enable-or-disable-a-module`
* :doc:`update-config.yml-settings`

Docker
~~~~~~
* :doc:`change-local-container-settings`

Setup
~~~~~
* :doc:`setting-up-local-project`


Full Table of Contents
~~~~~~~~~~~~~~~~~~~~~~
.. toctree::
:maxdepth: 1
:maxdepth: 2

add-client-custom-config
add-contrib-library
Expand All @@ -23,7 +66,6 @@ These are common development tasks throughout the lifecycle of a project.
run-tests-locally
setting-up-local-project
temp-disable-module-in-environment
troubleshooting-docker-data-starter
update-a-contrib-module
update-config.yml-settings
update-data-starter
Expand Down
22 changes: 10 additions & 12 deletions docs/common_tasks/setting-up-local-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,21 @@

1. Install docker as described in [Local Docker Environment](../getting_started/setting-up-local-docker)
2. Run **docker-machine start default; eval "$(docker-machine env default)"** if you haven't already
3. cd into "~/docker-share/CLIENT-GIT-REPO"
3. cd into ``~/docker-share/CLIENT-GIT-REPO``
4. Setup S3 backup access
1. Ask Pluto for S3 credentials
2. create aws credentials file
1. vim ~/.s3-curl
2. Add
```
%awsSecretAccessKeys = (
1. Get S3 credentials
2. Create aws credentials file
1. ``vim ~/.s3-curl``
2. Add: ``%awsSecretAccessKeys = (
local => {
id => 'AWS_ID',
key => 'AWS_KEY',
}
);
```
5. run **ahoy docker up** will bring up docker containers
6. run **ahoy site up**
10. run **ahoy docker url** to get the site url
);``

5. Run **ahoy docker up** will bring up docker containers
6. Run **ahoy site up**
10. Run **ahoy docker url** to get the site url

## Troubleshooting

Expand Down
5 changes: 5 additions & 0 deletions docs/deployment/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Deployment
--------

.. toctree::
:maxdepth: 1
2 changes: 1 addition & 1 deletion docs/docker-dev-env/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Local Docker Development Environment
Docker Development Environment
-----------


Expand Down
2 changes: 1 addition & 1 deletion docs/docker-dev-env/installation.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Setting up Your Local Docker Environment
# Setting up Your Local Docker

The steps to setup the DKAN development environment are as following:
1. Run the universal Docker installer (recommended) and/or run the commands manually to make sure that the Docker Machine is properly setup.
Expand Down
10 changes: 5 additions & 5 deletions docs/getting_started/custom-site-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $ ahoy utils name

The following customizations (other than Acquia environment) are currently available in ``config/config.yml``. We expect to add more configuration settings here including installed modules, variables, and other settings.

```yml
```
default:
hostname: localhost [We recommend keeping this.]
https_everywhere: FALSE [Whether all traffic is redirected to https. Recommended.]
Expand Down Expand Up @@ -71,7 +71,7 @@ We've added the ``features_master_temp_enabled_modules`` feature so that some mo

See:

* [Adding a custom module](../common_tasks/add-custom-module)
* [Adding a contributed module](../common_tasks/add-contrib-module)
* [Adding a contributed library](../common_tasks/add-contrib-library)
* [Adding Custom Behat tests](../common_tasks/add-custom-behat-test)
* [Adding a custom module](../common_tasks/add-custom-module.md)
* [Adding a contributed module](../common_tasks/add-contrib-module.md)
* [Adding a contributed library](../common_tasks/add-contrib-library.md)
* [Adding Custom Behat tests](../common_tasks/add-custom-behat-test.md)
4 changes: 3 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ Table of Contents

introduction/index
getting_started/index
common_tasks/index
docker-dev-env/index
common_tasks/index
tutorials/index
troubleshooting/index
modules/index
deployment/index
22 changes: 22 additions & 0 deletions docs/modules/custom-config.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Custom Config
-------------

The idea for the "Custom Config" module is to have all of the overrides for a DKAN project in a single place. These would not include new features that a project uses but just the configuration changes. This makes it easier to see and evaluate the configurations for a DKAN project because they are in a uniform place.

The "Custom Configuration" module is designed to contain:

* A list of custom modules to enable by default
* Overrides of "Data Config"
* Custom functions that override DKAN
* Features exports that override DKAN
* All the features components that need to be banished through features_banish
* custom updates (hook_update_N)

List of Custom Modules to Enable
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The ``/config/modules/custom_config/custom_config.features.features_master.inc`` file contains a list of all of the modules and themes that should be enabled or disabled by default in a project that are not part of DKAN Starter.

The list of modules that DKAN Starter enables can be found in ``/assets/modules/data_config/data_config.module``.

For more information see :doc:`../common_tasks/enable-or-disable-a-module`.
10 changes: 10 additions & 0 deletions docs/modules/data-config.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Data Config Module
------------------

The "Data Configuration" module contains setup and configuration items for DKAN Starter sites.

It contains a list of all modules that should be enabled.

Update functions that need to be run for updates that are not part of DKAN are included here.

It is called "Data" config because this project used to be named "Data Starter".
Loading

0 comments on commit f5cfa66

Please sign in to comment.