Page MenuHomeDevCentral

Deploy static sites to /var/wwwroot
ClosedPublic

Authored by dereckson on Oct 21 2017, 19:43.
Tags
None
Referenced Files
F3327302: D1082.diff
Mon, Jul 8, 14:39
F3327286: D1082.id2767.diff
Mon, Jul 8, 14:33
F3325071: D1082.id2792.diff
Mon, Jul 8, 06:28
Unknown Object (File)
Thu, Jul 4, 14:43
Unknown Object (File)
Thu, Jul 4, 10:37
Unknown Object (File)
Thu, Jul 4, 06:03
Unknown Object (File)
Sat, Jun 29, 13:52
Unknown Object (File)
Sat, Jun 29, 10:24
Subscribers
None

Details

Summary

Pillar

The web_domains contains groups.

The dictionary format allows to merge several pillar states in one, per
https://docs.saltstack.com/en/latest/topics/pillar/#pillar-dictionary-merging

The web_static_sites contains sites matching all the following conditions:

  1. The site is in a salt://wwwroot/<domain>/<subdomain>
  2. There is nothing to do to build the site (ie Git version = live version)
  3. Files can be owned by <domain user>:<web group>

Static sites

Static sites can be deployed:

  • through custom Salt states (see 2995a8f6)
  • just adding them to web_static_sites (see above)

Currently, the nginx configuration isn't handled by Salt,
only the file provisioning.

User accounts

A web group is created, each domain receives an account,
mainly to serve static content.

If an application runs, it should be as much as possible
isolated, to avoid to propagate security issues from one
application to another.

Sites deployed

  • www.nasqueron.org
  • ftp.nasqueron.org
  • docker.nasqueron.org
  • trustspace.nasqueron.org
Test Plan

State has been successfully applied on Ysul.

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Rebased against master.

Added FTP

Depends on D1091.

dereckson added a parent revision: D1091: Stage ftp.nasqueron.org.

Dictionary format change hasn't been applied to all states.

Apply new web_domains format to directories sls

dereckson retitled this revision from WIP: Deploy static sites to /var/wwwroot to Deploy static sites to /var/wwwroot.
dereckson edited the summary of this revision. (Show Details)
dereckson edited the test plan for this revision. (Show Details)
dereckson added a reviewer: dereckson.
dereckson edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Oct 22 2017, 12:10
This revision was automatically updated to reflect the committed changes.