-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #221 from consuldemocracy/release_2.1.0
Install Consul Democracy 2.1.0
- Loading branch information
Showing
20 changed files
with
228 additions
and
106 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 |
---|---|---|
|
@@ -26,7 +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 | ||
- 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. | ||
|
@@ -102,7 +104,7 @@ Setup locally for your [development environment](https://docs.consuldemocracy.or | |
Checkout the latest stable version: | ||
|
||
``` | ||
git checkout origin/2.0.1 -b stable | ||
git checkout origin/2.1.0 -b stable | ||
``` | ||
|
||
Create your `deploy-secrets.yml` | ||
|
@@ -205,13 +207,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.0/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.0/group_vars/all) and update it with a valid email address: | ||
|
||
``` | ||
#letsencrypt_email: "[email protected]" | ||
|
@@ -258,7 +260,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.0/group_vars/all)) | ||
|
||
## Other deployment options | ||
|
||
|
@@ -288,7 +290,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.0/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 |
---|---|---|
|
@@ -37,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 | ||
|
@@ -48,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
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,19 @@ | ||
[Unit] | ||
Description=Puma HTTP Server for {{ app_name }} ({{ env }}) | ||
After=network.target | ||
Requires={{ puma_service_unit_name }}.socket | ||
|
||
[Service] | ||
Type=simple | ||
WorkingDirectory={{ release_dir }} | ||
ExecStart=/bin/bash -lc '{{ rvm_command }} && bundle exec puma -C {{ puma_config_file }} -e {{ env }}' | ||
ExecReload=/bin/kill -USR1 $MAINPID | ||
StandardOutput=append:{{ puma_access_log }} | ||
StandardError=append:{{ puma_error_log }} | ||
Environment=EXECJS_RUNTIME=Disabled | ||
Restart=always | ||
RestartSec=1 | ||
SyslogIdentifier=puma | ||
|
||
[Install] | ||
WantedBy=default.target |
Oops, something went wrong.