All Projects → larastudio → stedding

larastudio / stedding

Licence: MIT License
Ansible playbooks for Laravel LEMP Stack

Programming Languages

Jinja
831 projects
shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to stedding

Linchpin
ansible based multicloud orchestrator
Stars: ✭ 107 (+245.16%)
Mutual labels:  ansible-playbooks, provisioning
lykops
lykops是一套web可视化的运维自动化项目,基于python3+django开发的。可视化、简化执行ansible任务,并提供详细的任务执行报告。
Stars: ✭ 129 (+316.13%)
Mutual labels:  ansible-playbooks
dev-machine
Ansible setup for maintaining a development environment
Stars: ✭ 30 (-3.23%)
Mutual labels:  provisioning
ansible-playbooks-in-practice
Repository contains all type of ansible playbooks
Stars: ✭ 31 (+0%)
Mutual labels:  ansible-playbooks
cortx-prvsnr
CORTX Provisioner offers a framework which accepts configurations (cluster.yaml and config.yaml) in the form of ConfigMap, translates into internal configuration (CORTX Conf Store) and then orchestrates across components mini provisioners to allow them to configure services. In Kubernetes environment, CORTX Provisioner framework runs on all the …
Stars: ✭ 16 (-48.39%)
Mutual labels:  provisioning
deploykit
A toolkit for creating and managing declarative, self-healing infrastructure.
Stars: ✭ 2,246 (+7145.16%)
Mutual labels:  provisioning
foreman bootdisk
ISO and USB boot disk support for Foreman
Stars: ✭ 62 (+100%)
Mutual labels:  provisioning
eksphemeral
A simple Amazon EKS manager for ephemeral clusters
Stars: ✭ 68 (+119.35%)
Mutual labels:  provisioning
docker-mail-server
Ansible playbooks to deploy a full featured mail server stack using Docker.
Stars: ✭ 47 (+51.61%)
Mutual labels:  ansible-playbooks
vboxpower
VirtualBox Power Driver for MAAS
Stars: ✭ 107 (+245.16%)
Mutual labels:  provisioning
rak8s
Stand up a Raspberry Pi based Kubernetes cluster with Ansible
Stars: ✭ 362 (+1067.74%)
Mutual labels:  ansible-playbooks
netascode
This repo contains an example of the virtual network of a fictitious company which you can use to play and to learn network automation. Public repository for Network as Code. NaC model.
Stars: ✭ 36 (+16.13%)
Mutual labels:  ansible-playbooks
ansible-viz
Graph relationships between Ansible playbooks / roles / tasks / vars etc. via static analysis
Stars: ✭ 33 (+6.45%)
Mutual labels:  ansible-playbooks
RHEL7-CIS
Ansible RHEL 7 - CIS Benchmark Hardening Script
Stars: ✭ 28 (-9.68%)
Mutual labels:  ansible-playbooks
config-o-matic
🍷 Configure Slackware installs in no time with config-o-matic!
Stars: ✭ 16 (-48.39%)
Mutual labels:  provisioning
scimgateway
Using SCIM protocol as a gateway for user provisioning to other endpoints
Stars: ✭ 98 (+216.13%)
Mutual labels:  provisioning
kickoff
Project Bootstrapping Tool
Stars: ✭ 22 (-29.03%)
Mutual labels:  provisioning
omnia
An open-source toolkit for deploying and managing high performance clusters for HPC, AI, and data analytics workloads.
Stars: ✭ 128 (+312.9%)
Mutual labels:  ansible-playbooks
ansible-debian
Buildfiles: Ansible automated leight-weight and sensible Debian provisioning
Stars: ✭ 83 (+167.74%)
Mutual labels:  provisioning
ansible-st2
Ansible Roles and Playbooks to deploy StackStorm
Stars: ✭ 85 (+174.19%)
Mutual labels:  ansible-playbooks

Stedding

Stedding is a minimalistic LEMP Stack setup for Laravel PHP. It facilitates the setting up of Laravel apps on a well prepared Ubuntu based VPS using Ansible Playbooks.

Local Box Requirements

You need to have Ansible installed on your local computer. This really differs from box to box See Ansible Documents for instructions.

For hashing the password for the admin user you have to install passlib:

pip install passlib

Remote Server Requirements

To run Ansible Playbooks properly on Ubuntu 20.10+ we need to setup a sudo user and make sure Python and some other packages such as ppa:ondrej/php are available so Ansible can run. The setting up of a sudo user and adding of the SSH keys has been taken care of. So is the adding of Python and Ondrej's PHP PPA. All you need is root access to the Ubuntu 16.0.4 box. Preferably using an SSH key.

NB Gist with useful setup tips

Playbooks

  • Install prerequisites
  • Sudo user Creation
  • Web user Creation
  • LEMP Provisioning
  • Laravel Homebase Setup

Roles

Geerllingguy Roles:

added where possible with ansible-galaxy install --roles-path . geerlingguy.rolename inside roles folder.

Stedding Variables

Do not forget to adjust the vars in:

  • group_vars/all
  • vars/mainyml
  • hosts

where need be.

Hosts

Here you normally add at least the ip address for the server. We added two hosts in this example:

[web]
xxx.xxx.xx.xxx
[database]
xxx.xxx.xx.xxx

Main Variables

The variables in vars/main.yml are for setting up PHP, MySQL and Nginx details based on Geerlingguy roles.

All Variables

The variables in group_vars/all are for the repo, keys, branch, user, password and domain.

example:

repo_url : [email protected]:Larastudio/larastudio.git
github_keys: https://github.com/jasperf.keys
git_branch: master
sudo_user: admin
web_user: web
upassword: passsword
domain: larastud.io
database_name: database_name
database_user: database_user
database_user_password: database_user_password

Nginx

Nginx details are stored in vars/main.yml and server.yml . One host for the site being used for testing purposes has been added there. Do change it to work with the domain of your choice.

Certbot

Using Geerling's Certbot role Let's Encrypt's Certbot has been added to the server. This allows the site to use Let's Encrypt SSL certificate. This does however not adjust the Nginx's domain configuration to server on 443 and redirect port 80 traffic to port 443. Tweaks for this are being made.

Nginx Certbot plugin has to be added using

sudo apt-get install python-certbot-nginx

A task is in the works, but not done. Then you can run:

certbot --nginx

to start the installation. You will then be asked to choose a domain. Next, they will ask you to agree with the TOS and install all. Working on an incorporation on the server still.

NB May not be necessary if you run your own certs only. See further down on SSL

PHP

To work with PHP 7.4 Ondrej's PHP PPA is added in requirements playbook using:

- name: Add repository for PHP 7.
      apt_repository: repo='ppa:ondrej/php'

PHP OpCache

For pre compiling PHP scripts Stedding uses PHP OpCache. For quick emptying OpCache use /etc/init.d/php7.1-fpm restart . Read more on it at Ma.ttias.be

Memcached

"Free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load."

MariaDB

The MariaDB details are added to vars/main.yml are just dummy data. Do adjust them.

Composer

Composer is added and binary is put in the directory of the web user. Laravel is also added as a globally required package so it can be used.

Mail

To set up your Laravel application to work with Mailgun for sending out emails which is used in this repo check out this Laravel document

Nodejs

Nodejs role is installed and we automatically add the following global packages:

nodejs_npm_global_packages:
  - name: yarn
  - npm

Laravel Homebase Setup

To run your Laravel application from a specific project directory, the one added to your Nginx configuration, we have added a separate playbook. One we will expand upon soon with other tasks. For now the project directory is created only using this task:

  - name: Project Folder Creation
    file: dest=/var/www/{{domain}} mode=2755 state=directory owner=web group=www-data

The domain can be set in group_vars/all. [GUID]

Let's Encryp or Commercial SSL Certificates

OpenSSL role has been added so self signed certificates can be added when you would like to. Current Stedding setup is aimed at working with Let's Encrypt so this role has not been acitvated. The path to own SSL certificates have been commented out.

As you will see there are two server blocks. One is for port 80, the second one should be for port 443 and both in different files. Let's Encrypt task for auto renewal has also been added.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].