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
Unknown Object (File)
Sun, Nov 17, 22:36
Unknown Object (File)
Sat, Nov 16, 02:49
Unknown Object (File)
Fri, Nov 15, 04:47
Unknown Object (File)
Fri, Nov 15, 04:46
Unknown Object (File)
Fri, Nov 15, 04:31
Unknown Object (File)
Fri, Nov 15, 04:28
Unknown Object (File)
Fri, Nov 15, 03:58
Unknown Object (File)
Fri, Nov 15, 03:57
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 1474
Build 1722: arc lint + arc unit

Event Timeline

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

/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.

28

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

55

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
28

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

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

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
28

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

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

recurse!

51

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.