This section provides information for developers on how to develop the patterns library,
AWS CloudFront hosts and exposes both:
patterns.boston.gov
and
assets.boston.gov
This sub-domain is a centralized, public CDN serving theme/style and branding elements for City of Boston.
The main fleet pattern library is located in an s3 bucket named patterns.boston.gov
The root folder of this s3 bucket is referenced by a CloudFront Distribution (arn:aws:cloudfront::251803681989:distribution/E1PA4V9JL1L6RU
) which is exposed as a public website at the URL https://d2hk73kicft6oi.cloudfront.net.
The CoB LAN team have created a sub-domain patterns.boston.gov
on the public DNS servers, and this sub-domain has a CNAME which points tohttps://d2hk73kicft6oi.cloudfront.net
.
The AWS Certificate Manager (us-east-1) creates manages a AWS wildcard certificate for patterns.boston.gov
(why not use cob main wildcard??). This certificate is applied to the CloudFront Distribution to secure HTTPS traffic to the sub-domain endpoint/s.
Instructions on developing css and js for Drupal developers.
you will be able to view fleet on https://patterns.lndo.site
13:26and your local boston.gov on https://boston.lndo.site
- but it will now use css and js from patterns.lndo.site (the patterns container acting as a CDN) (edited) 13:27you will find the patterns files in reporoot/patterns
13:28Gulp and stencil processes in the patterns container will monitor that folder for changes, and immediately rebuild the fleet website and put the js and css (ie. the CDN) into reporoot/patterns/public
. (edited) 13:31the boston and patterns repos are managed separately by git and commiting changes to the files you make should automatically apply to the correct repo.13:31(i.e patterns changes to patterns repo, and d8 changes to the boston repo)
Icons are created and uploaded to an s3 bucket for storage. The s3 bucket is registered with CloudFront so it can act as a CDN for consumption in web applications.
AWS CloudFront hosts and exposes both:
patterns.boston.gov
and
assets.boston.gov
This sub-domain is principally designed to act as a centralized, public CDN serving media assets (images, icons and docs) from the patterns server. It is on a separate sub-domain from the patterns server to simplify relocation of these assets to a different resource (i.e. apart from the css and js elements of the fleet patterns server) in the future should the need arise.
The icon folder in the fleet pattern library is located inside the main s3 bucket named patterns.boston.gov
The /assets
folder of this s3 bucket is referenced by a CloudFront Distribution (arn:aws:cloudfront::251803681989:distribution/E2NTMFQ3KYUMFB
) which is exposed as a public website at the URL https://d33pore7x73r0y.cloudfront.net.
The CoB LAN team have created a sub-domain assets.boston.gov
on the public DNS servers, and this sub-domain has a CNAME which points tohttps://d33pore7x73r0y.cloudfront.net
.
The AWS Certificate Manager (us-east-1) manages an AWS wildcard certificate for *.boston.gov
(why not use the cob main wildcard cert??). This certificate is applied to the CloudFront Distribution to secure HTTPS traffic to the sub-domain endpoint.
The CoB LAN team have created a second sub-domain assets_sftp.boston.gov
on the public DNS servers, and this sub-domain has a CNAME which points to s-27207a4a63144da48.server.transfer.us-east-1.amazonaws.com
An SFTP server has been created with a custom host name of assets_sftp.boston.gov
and users created with home directories pointing to the /patterns.boston.gov/assets
.
There is a Lambda function "watching" the s3 bucket patterns.boston.gov/assets
. When files are added to this folder, and event is fired which launches a node12.x script that updates a manifest.txt
on assets.boston.gov
file containing the current directory contents. This file is consumed by a cron process in Drupal which updates the Drupal Media Library with the new icons. Note: Delete actions do not delete icons from the library.
Designers and other individuals who require FTP access to contribute to assets in the patterns library need to do the following:
Connect Via SFTP Client
Ask and AWS admin to create an IAM account in AWS (if not one already).
Have the user (create and) load an SSH key onto their account in AWS.
Add the user to the Users list in the SFTP server on AWS.
Test a connection to the SFTP server at https://assets_sftp.boston.gov using filezilla or another FTP client which can create SFTP connections.
[optional] Create a local mount on the designers Mac.sshfs -o rw,IdentityFile=/Users/doitimac/.ssh/id_rsa username@assets_sftp.boston.gov:/patterns.boston.gov/assets /mnt/patterns/
(Optional) Mounting AWS SFTP as a Drive (Mac)
Pattern library built on the new design of Boston.gov.
Used on Boston.gov and all web apps and sites that need to match its design (which should be all of them).
Named to honor Bostonian Peter Fleet, an engraver who was enslaved by noted printer Thomas Fleet during the first half of the 18th century.
Production: https://patterns.boston.gov/
GitHub: CityOfBoston/patterns
Design: Sebastian Ebarb, Caroline Stjarnborg
Engineering: Stella Ubaha, Philip Kelly, Jim Fisk, Fin Hopkins
Why a pattern library? It's all about making life easier (Launch press release)
Maintenance