NOTE: Running this project on the Mac or Windows requires that you have Docker for Mac Community Edition (edge) installed. If you are running the stable version you will encounter performance issues that will make this project extremely slow, and you will encounter gateway errors in certain instances.
In order to stand up a development environment using Docker, you need to have the following:
The install process is multistep:
make sync-files-directory)docker/docker-github.yml to the project root, and add your Github Authentication token (see below for more info)make initialize)When you've completed the above steps, your site will be available at http://local.martincounty.us:8080
To shut down your development environment use the command make down. This will destroy your containers, shut down Docker sync and remove any data volumes. These will get recreated when you execute the command make initialize.
The Makefile has syncing commands that assume that you have a SSH alias set up on your local dev computer. That alias needs to be named "martincodev".
In order to set up a SSH alias, you will need to have your public key installed on the martincounty.prometdev.com server, and you need to know your username.
You also need to know the location on your development machine of your private key. Unless you are storing them in another place, they are typically located in the folder ~/.ssh. By default your private key is named id_rsa, although you can use another name for your key.
To add a SSH alias, edit (or add) the file ~/.ssh/config and add the following:
host martincodev
User <username>
HostName martincounty.prometdev.com
IdentityFile <path/to/privatekey/id_rsa>
Save this file, and attempt to ssh into the server with the command "ssh martincodev". If you are successful, everything is set. If you get an error message, please file an issue with the SysAdmin team regarding troubleshooting your server access.
Because of GitHub's rate limits on their API it can happen that Composer prompts for authentication asking your username and password so it can go ahead with its work. This will break the automated build process using Composer inside a Docker container.
You can generate an authentication token for Github here: https://github.com/settings/tokens
If you already have an authentication token for Github stored locally for Composer, you can use that token. For Mac / Linux users that token is found in ~/.composer/auth.json
Copy the file docker/docker-github.yml into the project root where the docker-compose.yml file is located, and edit the file to add your token to the GITHUB_AUTH_TOKEN environment variable under the php service key.
The database file is available on the Promet Martin County dev / staging server, and will be pulled automatically if a copy is not available locally in build/ref. This database is updated nightly; if you need a new copy you can obtain one using make refresh-db.
Run make sync-files-directory to sync the non-document files from Acquia Cloud (this syncs from the dev server). This will get you the aggregated CSS / JS files, and all of the images on the site, but will not pull the document files.
If you're working on any code related to search, you can build the search indices on your local machine with the following command:
make reindex-solr-search
This may take a while to build. You may have to run make index-solr-search if the above command times out. Typically it takes three runs to index all nodes (~35,000 items indexed).
To see all of the targets in the Makefile, you can issue the following command:
make help
There are a number of cron jobs on production in Acquia Cloud that keep the site running properly. Most of these jobs are involved with pulling document metadata from Documentum and queueing those up for processing by Tika, and subsequent indexing by Solr, and for processing the queue.
These jobs are currently documented in [[CRONJOBS.md]]. If these jobs are changed, [[CRONJOBS.md]] needs to be updated accordingly. It is the only documentation that exists for these, as they are not under version control.
The following patches have been applied to Drupal Core:
https://www.drupal.org/node/1697570#comment-11901028 https://www.drupal.org/node/1311820#comment-9581751 https://www.drupal.org/node/2821441#comment-11764648
Note the following patches, not applied here but applicable:
This patch is a replacement for https://www.drupal.org/node/1697570#comment-11901028: https://www.drupal.org/node/1978176#comment-11094363
This patch is a reroll of https://www.drupal.org/node/2821441#comment-11764648 https://www.drupal.org/node/1697570#comment-11901028
The date in parentheses after each module is the date the notes were last updated in this README. If you add or change the notes, please update the dates accordingly.
This module was previously patched with patch audit_log-notice_in_auditlog_construct-2596653-2.patch.
This patch was reviewed and merged into the dev branch on 29 Jan 2016, along with some other patches that addressed other issues. After a review of the differences between the dev version and the stable version, a decision was made to eliminate patching the stable version in favor of installing the dev version of this module.
The Dev version installed is the version available as of 2016-Feb-04.
This module has been patched to address an issue identified in https://www.drupal.org/node/2094217. The patch submitted does partially address the problem. The patch name does not comply with drupal coding standards, so the issue number is noted here. Note: this patch creates an undocumented dependency on the contrib module Entity API.
To fully address this issue if it recurs, you may also have to clear the Memcached cache. In the rare event that this needs to be done on Acquia Cloud, instructions can be found here:
https://docs.acquia.com/article/memcache-monitoring-and-flush-using-nc-command
This module is a patched version of 7.x-1.0.
The following patches have been applied:
https://www.drupal.org/node/2470347#comment-12136575 https://www.drupal.org/node/2578763#comment-10400609
This module is a patched version of 7.x-1.0-beta3.
The following patches have been applied:
https://www.drupal.org/node/2854318#comment-11947374
This module is a patched version of 7.x-2.0.
The following patches have been applied:
https://www.drupal.org/node/2447949#comment-9695939
Note: This should be revisited, there is a more recent patch that is more relevant, but currently needs to be rerolled.
This module is a patched version of 7.x-1.2.
The following patches have been applied:
https://www.drupal.org/node/2609460#comment-10534040 https://www.drupal.org/node/2610188#comment-10537832
*Note: The second patch, 2610188, was created by A. Chappel, but is disputed by the module maintainer. See the discussin thread for more information.
This patch creates a dependency in Linkchecker on the AdvancedQueue module.
This module is a patched version of 2.0-dev, pinned at commit #5176491
The following patches have been applied:
https://www.drupal.org/node/1706596#comment-10502560
This module is a patched version of 1.0-dev, pinned at commit #5990977
The following patches ave been applied:
https://www.drupal.org/node/2505421#comment-10019375
Note: There is a dispute about this patch from the module maintainer on the discussion thread.
This module is a patched version of 7.x-1.3.
The following patches have been applied:
https://www.drupal.org/node/1879804#comment-7316380
This module is a patched version of 7.x-1.10.
The following patches have been applied:
https://www.drupal.org/node/2726829#comment-11974812
This module is a patched version of 7.x-1.5.
The following patches have been applied:
https://www.drupal.org/node/1475642#comment-9113437
Note: there are more recent versions of this patch that should be investigated and potentially used in lieu of the one documented here.
Whenever we removing a role, We make sure that we search for any occurrences of that role that may be left in code after we delete the role from the “roles” page in the Admin UI (grep is a good tool for this
grep “<user role>” -n -r *
You can run that inside the modules folder and it will return the filename, and line number where the string in quotation marks occurs). If there are any occurrences you will need to delete them manually from code.
The permissions will be housed in code not only in the martin_county_content_workflow.features.user_permission.inc but also in the martin_county_content_workflow.info file; if you are removing a workbench moderation permission completely you may have to manually delete it from the .info file, as features doesn’t always remove those cleanly.
A clue that there is problem will occur when you build your local environment from scratch, and you start seeing multiple occurrences of this error when you revert features:
in_array() expects parameter 2 to be array, null given features.user.inc:151
Moderation state option, 'Needs Review' is currently disabled via, hook_workbench_moderation_states_next_alter(). Please see, martincounty_helper_workbench_moderation_states_next_alter() on martincounty_helper.module.
To get information on development tips, deployment, and information about your local development machine, continue reading.
This project is also hosted on Acquia.
This project has automated testing set up for Pull Requests and automatic pushes to both Promet Dev and Acquia Dev.
This project uses the idea of an artifiact repository located on Acquia at [email protected]:martin.git Please see the Deployment To Acquia section below.
Line comments, or the sass debug info, is removed when we do compass compile. However, for local development, you may opt to see sass debug info in the compiled css for debugging purposes. To do this, just set the environment to development i.e., compass compile --environment=development.
$GIT_COMMIT with the ID of the commit you wish to push.
Note: This is easiest found on github or in git log Ex: e359b2b01242e71e5b384774d278241f7b1615b2
After pressing build, Jenkins will push a rendered version of the site (runs composer, puts configuration where it needs to be, etc.) to the acquia repository to the branch you declared. It then changes the deployed code of the environment you specified, then fires the "Martin Co Acquia Sync Database" task on the environment of your choice. This runs the cloud hooks needed to run update.sh
Due to the cloud hooks that are in place, pushing to production is a breeze.
This project does have a couple of special setup items that need to be taken in account for local development.
To test documentum, this has to pull from the Martin documentum server. To accomplish this, we have set up a drush command that builds queue items. The queue is implemented using AdvancedQueue. On prod these steps are implemented in a series of cron jobs.
The gist of the workflow is like this:
Custom Drush Command drush mc-pull-files
In the queue drush advancedqueue DOCUMENTUM_QUEUE_NAME
To use locally, simply do the following:
drush mc-pull-files [--types]
drush advancedqueue --all
NOTE: advancedqueue will run forever if you let it. You will have to kill
it with CTRL-C. Use drush advancedqueue-list to see if your queue is done
running.If you need to do PDF Parser development, you can easily do so on this vagrant machine. PDF Parser is pulled down to your machine and is running on port 8081. You can see it in build/vagrant.sh where it is started for you on provision. An example request can be.
http://martincounty.dev:8081/http%3A%2F%2Fwww.pdf995.com%2Fsamples%2Fpdf.pdf
This project uses a service provider that allows Single Sign On. This is called SimpleSAMLphp. This is NOT Drupal specific and is the only Acquia supported SSO method.
You will not be able to use this locally, You will need to test it on one of the following servers.
Acquia Prod: 107.21.97.85 54.243.131.134 54.243.132.39
Acquia Stage and Dev 54.225.165.124
MartinCounty.PrometDev.com 104.130.70.101
Your machine has a copy of Solr installed on it. Your Search API server connection will be automatically generated to connect to Solr. Use built in drush commands to interact with Search API.
Keep in mind the database has a now outdated references between YOUR solr and YOUR drupal, because it was referencing PRODUCTION'S solr before. If you are doing anything that involves testing search... in order to get the correct results YOU MUST REINDEX
To reindex search in Drush run:
drush search-api-clear
drush search-api-index
This is the case on Acquia Staging and Acquia Dev as well. You will find a Jenkins Job that will allow you to reindex either dev or staging. Simply input the environment as dev or test. This WILL work on production as well but only use under EXTREME circumstances.
XML Sitemap will be working at the production site in https://www.martin.fl.us/sitemap.xml. Other environments, namely the prometdev, acquia dev, and acquia stage may return a blank sitemap.xml page. The acquia prod https://martin.prod.acquia-sites.com/sitemap.xml will also return a blank sitemap.xml page, even though it is also martin.fl.us. This is due to the fact that xml sitemap remembers the settings it was last saved. For example, using firefox, if you visit https://martin.prod.acquia-sites.com/sitemap.xml, you will see the following error:
Error loading stylesheet: An unknown error has occurred (805303f4)
https://www.martin.fl.us/sitemap.xsl
If we save settings using the acquia prod, the martin.fl.us site will be the one showing the blank xml page and the above error trying to load stylesheet from the other domain. On that note, all settings for xml sitemap shall be done using the main domain.
Docker sync has helped performance locally.
To implement that (on Mac OS X):
brew install unison
brew install eugenmayer/dockersync/unox (if error installing, may have to "brew install python@2")
gem install docker-sync
docker-compose -f docker-compose.yml -f docker-compose-mac.yml up -d
docker-sync start
Content type
Image
Digest
Size
284.1 MB
Last updated
over 7 years ago
docker pull promet/solr-mc