[Charlotte-pm] Is there an Ansible solution to this deployment process?

Yanick Champoux yanick at babyl.ca
Thu Aug 26 06:29:00 PDT 2021


Hey William!

Those steps are all easily Ansible, except for one that I have to think a little more.

Instead of dumping a huge answer -- or one with the recipe and no explanation -- right here, I'll blurp it as steps during the day. I might be slow-ish as $dayjob is murder these days. :-)

So, very first thing: documentation!

Ansible actually comes with a cli command `ansible-doc` that is just as awesome as perldoc. It provides the manpages of the modules installed locally. And they come with examples and stuff. It's really nice.


And then there is the main website: https://docs.ansible.com/ansible-core/devel/index.html

And for those who like books, I have "Ansible: Up and Running" and recommend it. It's short and to the point, and served me well. 

Next step coming up shortly!
`/anick

On Thu, 26 Aug 2021, at 7:17 AM, William McKee wrote:
> Hey Perl Mongers,
> 
> Thanks for your input on helping me solve my deployment problem to a multi-tenant Dancer app. Here are the steps that I shared in the Zoom call last night:
> 
>> 5. Login to server as a user with sudo privs and cd to the sites directory (e.g., `cd /home/dancer/cv/sites/SITEURL`)
>> 6. Setup the service to start/stop the service
>>   1. `sudo cp bin/cv-SITENAME.service /etc/systemd/system/`
>>   2. `sudo chmod 644 /etc/systemd/system/cv-SITENAME.service`
>>   3. `sudo systemctl enable cv-SITENAME.service --now`
>>   4. `sudo systemctl status cv-SITENAME.service`
>> 7. Setup nginx
>>   1. Copy the nginx.conf config file `sudo cp environments/SITENAME-nginx.conf /etc/nginx/sites-enabled` directory
>>   2. Restart nginx (`sudo service nginx reload`)
>> 8. Setup SSL
>>   1. Run `sudo certbot --nginx` and choose the new domain to setup (use the non www domain)
>>   2. Choose to redirect the HTTP traffic to HTTPS
>>   3. *Do* run the configuration test at ssllabs.com (look for link in output from command)
>> 
> Is this an easy problem for Ansible? The `sudo` and certbot parts are where I see the challenges.
> 
> For certbot, I've been using the "wizard" configurator in certbot and imagine there's a way to pass in all the settings that are needed on the command line.
> Running the test on ssllabs.com is something that I can do manually so long as I get back the link from Ansible output.
> 
> 
> Thanks for your suggestions!
> William
> 
> -- 
> 
> 
> 
> *William McKee*
> Managing Partner at Knowmad Digital Marketing
> 
> *P *704.343.9330 Ext. 803* ­**M *(704) 737-6596‬ <tel:(704)+737-6596%E2%80%AC>* ­**E *william at knowmad.com* ­**W *http://www.knowmad.com/ <http://www.knowmad.com/?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>* ­*
> facebook <https://www.facebook.com/knowmadclt/?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
> linkedin <https://www.linkedin.com/company/knowmad?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
> twitter <https://twitter.com/KnowmadCLT?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
> instagram <https://www.instagram.com/knowmadclt/?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
> 
 <https://www.knowmad.com/meetings/william?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
> Should we talk? Schedule a meeting with me. <https://www.knowmad.com/meetings/william?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
> 
> 
> -- 
> Charlotte-pm mailing list
> Charlotte-pm at pm.org
> https://mail.pm.org/mailman/listinfo/charlotte-pm
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/charlotte-pm/attachments/20210826/7315d2ca/attachment-0001.html>


More information about the Charlotte-pm mailing list