Page MenuHomeDevCentral

Add a new vhost for kerozen's FB Bot
ClosedPublic

Authored by jokerozen on Apr 16 2017, 22:30.
Tags
None
Referenced Files
F3744350: D952.id2435.diff
Fri, Nov 15, 04:47
F3744347: D952.id2428.diff
Fri, Nov 15, 04:46
F3744286: D952.id2431.diff
Fri, Nov 15, 04:31
F3744283: D952.id2432.diff
Fri, Nov 15, 04:28
F3744206: D952.id2426.diff
Fri, Nov 15, 03:58
F3744204: D952.id2434.diff
Fri, Nov 15, 03:57
F3744193: D952.id2430.diff
Fri, Nov 15, 03:53
F3744188: D952.id2427.diff
Fri, Nov 15, 03:53
Subscribers

Details

Summary

I need some verifications for letsencrypt and facebook
+ my first steps with salt and phabricator and arc etc.

Test Plan
  • salt eglide state.apply roles/shellserver/eglide-website/
  • salt eglide state.apply roles/shellserver/web-hosting/
  • check site is live

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Passed
Unit
No Test Coverage
Branch
nginx-add-new-vhost
Build Status
Buildable 1473
Build 1721: arc lint + arc unit

Event Timeline

dereckson added inline comments.
roles/shellserver/web-hosting/files/eglide/nginx/vhosts/002-robot.paysannerebelle.com.conf
7

/002-robot.paysannerebelle.com.conf

The goal of this line is to know what files to edit in the repository when we read it directly on the server.

27

I wonder if we shouldn't serve websites from a dedicated web hierarchy like /var/wwwroot/paysannerebelle.com/robot (and hlp:hlp this folder)

54

You can discard the following lines.

It's to serve /home/foo/public_html as /~foo,
so we can have easily web directories.

fixed some errors, add new directory for the vhost in /var/wwwroot/

jokerozen added inline comments.
roles/shellserver/web-hosting/files/eglide/nginx/vhosts/002-robot.paysannerebelle.com.conf
27

I'm not sure I did that correctly...

roles/shellserver/web-hosting/files/eglide/nginx/vhosts/002-robot.paysannerebelle.com.conf
27

I guess that would mean it takes /etc/nginx002-robot.paysannerebelle.com.conf/ as the base folder to host the site.

roles/shellserver/web-hosting/files/eglide/nginx/vhosts/002-robot.paysannerebelle.com.conf
27

oooops not what I wanted. trying one more time

fix the root dir for the vhost

Rebased against origin/master

This revision is now accepted and ready to land.Apr 19 2017, 01:07
dereckson requested changes to this revision.Apr 19 2017, 20:20
dereckson added inline comments.
roles/shellserver/eglide-website/init.sls
25 ↗(On Diff #2431)

file.recurse allows you to copy files from the master.

This is used to provision websites, for example from a Git repository.

See https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html

I guess you only wish to create a directory (file.directory).

This revision now requires changes to proceed.Apr 19 2017, 20:20

I'll clarify the staging part in T1184.

dereckson edited edge metadata.

Tweak and cleanup

This revision is now accepted and ready to land.Apr 19 2017, 20:55
Salt master
$ salt eglide state.apply roles/shellserver/eglide-website/
eglide:
----------
          ID: /var/www/html
    Function: file.recurse
      Result: True
     Comment: Recursively updated /var/www/html
     Started: 20:59:46.487317
    Duration: 36421.606 ms
     Changes:   
              ----------
              removed:
                  - /var/www/html/index.nginx-debian.html
----------
          ID: /var/wwwroot/paysannerebelle.com/robot/
    Function: file.directory
      Result: False
     Comment: No directory to create /var/wwwroot/paysannerebelle.com/robot in
     Started: 21:00:22.920989
    Duration: 22.489 ms
     Changes:   
----------
          ID: /var/log/www/eglide.org
    Function: file.directory
      Result: True
     Comment: Directory /var/log/www/eglide.org is in the correct state
     Started: 21:00:22.944607
    Duration: 8.51 ms
     Changes:   
----------
          ID: /var/log/www/robot.paysannerebelle.com
    Function: file.directory
      Result: True
     Comment: Directory /var/log/www/robot.paysannerebelle.com updated
     Started: 21:00:22.954233
    Duration: 18.056 ms
     Changes:   
              ----------
              /var/log/www/robot.paysannerebelle.com:
                  New Dir

Summary for eglide
------------
Succeeded: 3 (changed=2)
Failed:    1
------------
Total states run:     4
Total run time:  36.471 s
roles/shellserver/eglide-website/init.sls
25 ↗(On Diff #2432)

recurse!

45 ↗(On Diff #2432)

What should be created is /var/log/www/paysannerebelle.com by the way (after I edited nginx config to be coherent with other servers /var/wwwroot/domain.tld/sub/ and /var/log/www/domain.tld/sub....log)

dereckson edited the summary of this revision. (Show Details)
dereckson edited the test plan for this revision. (Show Details)
This revision was automatically updated to reflect the committed changes.