forked from consuldemocracy/installer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag '2.1.1' into release_2.1.1
- Loading branch information
Showing
20 changed files
with
239 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# CONSUL DEMOCRACY Installer ![Build status](https://github.com/consuldemocracy/installer/workflows/tests/badge.svg) | ||
# CONSUL DEMOCRACY Installer ![Build status on Ubuntu](https://github.com/consuldemocracy/installer/workflows/ubuntu/badge.svg) | ||
|
||
[CONSUL DEMOCRACY](https://github.com/consuldemocracy/consuldemocracy) installer for production environments | ||
|
||
|
@@ -26,8 +26,9 @@ It will also create a `deploy` user to install these libraries | |
A remote server with one of the supported distributions: | ||
|
||
- Ubuntu 20.04 x64 | ||
- Debian Buster x64 | ||
- Ubuntu 22.04 x64 | ||
- Debian Bullseye x64 | ||
- Debian Bookworm x64 | ||
|
||
Access to a remote server via public ssh key without password. | ||
The default user is `deploy` but you can [use any user](#using-a-different-user-than-deploy) with sudo privileges. | ||
|
@@ -103,12 +104,12 @@ To restart the server and deploy new code to the server we have to configure Cap | |
|
||
Create your [fork](https://help.github.com/articles/fork-a-repo/) | ||
|
||
Setup locally for your [development environment](https://docs.consuldemocracy.org/docs/english-documentation/introduction/local_installation) | ||
Setup locally for your [development environment](https://docs.consuldemocracy.org/tech_docs/introduction-1/local_installation) | ||
|
||
Checkout the latest stable version: | ||
|
||
``` | ||
git checkout origin/2.0.1 -b stable | ||
git checkout origin/2.1.1 -b stable | ||
``` | ||
|
||
Create your `deploy-secrets.yml` | ||
|
@@ -211,13 +212,13 @@ Using https instead of http is an important security configuration. Before you b | |
|
||
Once you have that setup we need to configure the Installer to use your domain in the application. | ||
|
||
First, uncomment the `domain` variable in the [configuration file](https://github.com/consuldemocracy/installer/blob/2.0.1/group_vars/all) and update it with your domain name: | ||
First, uncomment the `domain` variable in the [configuration file](https://github.com/consuldemocracy/installer/blob/2.1.1/group_vars/all) and update it with your domain name: | ||
|
||
``` | ||
#domain: "your_domain.com" | ||
``` | ||
|
||
Next, uncomment the `letsencrypt_email` variable in the [configuration file](https://github.com/consuldemocracy/installer/blob/2.0.1/group_vars/all) and update it with a valid email address: | ||
Next, uncomment the `letsencrypt_email` variable in the [configuration file](https://github.com/consuldemocracy/installer/blob/2.1.1/group_vars/all) and update it with a valid email address: | ||
|
||
``` | ||
#letsencrypt_email: "[email protected]" | ||
|
@@ -264,7 +265,7 @@ If you are on Ubuntu and would like to use its default `sudo` group instead of ` | |
deploy_group: sudo | ||
``` | ||
|
||
There are many more variables available check them out [here]((https://github.com/consuldemocracy/installer/blob/2.0.1/group_vars/all)) | ||
There are many more variables available check them out [here]((https://github.com/consuldemocracy/installer/blob/2.1.1/group_vars/all)) | ||
|
||
## Other deployment options | ||
|
||
|
@@ -294,7 +295,7 @@ If you do not have `root` access, you will need your system administrator to gra | |
|
||
## Using a different user than deploy | ||
|
||
Change the variable [deploy_user](https://github.com/consuldemocracy/installer/blob/2.0.1/group_vars/all#L12) to the username you would like to use. | ||
Change the variable [deploy_user](https://github.com/consuldemocracy/installer/blob/2.1.1/group_vars/all#L12) to the username you would like to use. | ||
|
||
## Ansible Documentation | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ | |
roles: | ||
- folder_structure | ||
- ruby | ||
- nodejs | ||
- rails | ||
- queue | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
- include: timezone.yml | ||
- include_tasks: timezone.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,9 @@ server_hostname: "{{ domain | default(ansible_default_ipv4.address) }}" | |
# Server Timezone | ||
timezone: Europe/Madrid | ||
|
||
# Consul Democracy Timezone | ||
application_timezone: "{{ timezone }}" | ||
|
||
# General settings | ||
env: production | ||
deploy_user: deploy | ||
|
@@ -34,6 +37,14 @@ database_user: "{{ deploy_user }}" | |
database_password: "{{ deploy_user }}" | ||
database_hostname: "localhost" | ||
|
||
# Puma | ||
# If you use Capistrano to deploy, make sure the puma_service_unit_name | ||
# variable is the same as `:puma_service_unit_name` in Capistrano | ||
puma_service_unit_name: "puma_{{ app_name }}_{{ env }}" | ||
puma_config_file: "{{ release_dir }}/config/puma/{{ env }}.rb" | ||
puma_access_log: "{{ shared_dir }}/log/puma_access.log" | ||
puma_error_log: "{{ shared_dir }}/log/puma_error.log" | ||
|
||
#SMTP | ||
smtp_address: "smtp.example.com" | ||
smtp_port: 25 | ||
|
@@ -45,6 +56,13 @@ smtp_authentication: "plain" | |
#LetsEncrypt | ||
letsencrypt_email: "[email protected]" | ||
|
||
# Node.js | ||
fnm_dir: "{{ home_dir }}/.fnm" | ||
fnm_command: "export PATH=\"{{ fnm_dir }}/:$PATH\" && eval \"$(fnm env)\"" | ||
|
||
# RVM | ||
rvm_command: "source {{ home_dir }}/.rvm/scripts/rvm" | ||
|
||
# Errbit | ||
errbit: False | ||
errbit_dir: "{{ home_dir }}/errbit" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
- name: Install fnm | ||
shell: | | ||
curl -fsSL https://fnm.vercel.app/install | bash -s -- --install-dir "{{ fnm_dir }}" | ||
args: | ||
chdir: "{{ home_dir }}" | ||
executable: /bin/bash | ||
creates: "{{ fnm_dir }}/fnm" | ||
|
||
- name: Read Node.js version | ||
shell: "cat .node-version" | ||
args: | ||
chdir: "{{ release_dir }}" | ||
register: node_version | ||
|
||
- name: Install nodejs via fnm | ||
shell: "{{ fnm_command }} && {{ rvm_command }} && fnm install {{ node_version.stdout }}" | ||
args: | ||
chdir: "{{ release_dir }}" | ||
executable: /bin/bash | ||
register: fnm_install_result | ||
until: "fnm_install_result is not failed" | ||
retries: 10 | ||
delay: 10 | ||
|
||
- name: Install Node packages | ||
shell: "{{ fnm_command }} && {{ rvm_command }} && fnm exec npm install --production" | ||
args: | ||
chdir: "{{ release_dir }}" | ||
executable: /bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.