This repository has been archived by the owner on Oct 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move starkcompass to secure VPN and change users. (#396)
* Changed host variable to stardardize name across repos. * Changed deploy configs to change starkcompass-testing user to dev.
- Loading branch information
1 parent
36d4029
commit f7a96c3
Showing
5 changed files
with
23 additions
and
23 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 |
---|---|---|
|
@@ -4,22 +4,22 @@ | |
gather_facts: false | ||
any_errors_fatal: true | ||
become: true | ||
become_user: starknet_explorer | ||
become_user: dev | ||
|
||
pre_tasks: | ||
|
||
- name: Delete tmp repo | ||
file: | ||
state: absent | ||
path: /home/starknet_explorer/tmp/madara_explorer | ||
path: /home/dev/tmp/madara_explorer | ||
|
||
- name: Clone repo in tmp dir | ||
ansible.builtin.git: | ||
repo: [email protected]:lambdaclass/stark_compass_explorer.git | ||
version: "{{ lookup('ansible.builtin.env', 'GIT_BRANCH') }}" | ||
dest: /home/starknet_explorer/tmp/madara_explorer | ||
dest: /home/dev/tmp/stark_compass_explorer | ||
ssh_opts: "-o StrictHostKeyChecking=no" | ||
key_file: /home/starknet_explorer/.ssh/id_ed25519 | ||
key_file: /home/dev/.ssh/id_ed25519 | ||
register: clone_output | ||
|
||
- name: Print clone repo output | ||
|
@@ -28,7 +28,7 @@ | |
- name: Build | ||
ansible.builtin.shell: | | ||
set -ex | ||
export PATH=${PATH}:/home/starknet_explorer/.cargo/bin | ||
export PATH=${PATH}:/home/dev/.cargo/bin | ||
mix local.hex --force | ||
mix local.rebar --force | ||
mix deps.get --only $MIX_ENV | ||
|
@@ -55,26 +55,26 @@ | |
ENABLE_TESTNET_SYNC: "{{ lookup('ansible.builtin.env', 'ENABLE_TESTNET_SYNC') }}" | ||
ENABLE_GATEWAY_DATA: "{{ lookup('ansible.builtin.env', 'ENABLE_GATEWAY_DATA') }}" | ||
args: | ||
chdir: /home/starknet_explorer/tmp/madara_explorer | ||
chdir: /home/dev/tmp/stark_compass_explorer | ||
register: build_output | ||
|
||
- debug: msg="{{ build_output.stdout_lines + [ build_output.stderr_lines ] }}" | ||
|
||
- name: Delete old repo | ||
ansible.builtin.file: | ||
state: absent | ||
path: /home/starknet_explorer/madara_explorer | ||
path: /home/dev/stark_compass_explorer | ||
|
||
- name: Copy repo from tmp dir | ||
ansible.builtin.copy: | ||
remote_src: true | ||
src: /home/starknet_explorer/tmp/madara_explorer | ||
dest: /home/starknet_explorer/ | ||
src: /home/dev/tmp/stark_compass_explorer | ||
dest: /home/dev/stark_compass_explorer | ||
|
||
- name: Create .env file | ||
ansible.builtin.template: | ||
src: .env.j2 | ||
dest: /home/starknet_explorer/.env | ||
dest: /home/dev/.env | ||
vars: | ||
phx_host: "{{ lookup('ansible.builtin.env', 'PHX_HOST') }}" | ||
secret_key_base: "{{ lookup('ansible.builtin.env', 'SECRET_KEY_BASE') }}" | ||
|
@@ -97,12 +97,12 @@ | |
- name: Create user systemd directory | ||
ansible.builtin.file: | ||
state: directory | ||
path: /home/starknet_explorer/.config/systemd/user | ||
path: /home/dev/.config/systemd/user | ||
|
||
- name: Install systemd service | ||
ansible.builtin.template: | ||
src: starknet_explorer.service.j2 | ||
dest: /home/starknet_explorer/.config/systemd/user/starknet_explorer.service | ||
dest: /home/dev/.config/systemd/user/starknet_explorer.service | ||
|
||
- name: Restart starknet_explorer service | ||
ansible.builtin.systemd: | ||
|
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,15 +1,15 @@ | ||
[Unit] | ||
Description=Madara Explorer | ||
Description=StarkCompass Explorer | ||
|
||
[Service] | ||
WorkingDirectory=/home/starknet_explorer/madara_explorer | ||
WorkingDirectory=/home/dev/stark_compass_explorer | ||
Restart=on-failure | ||
ExecStart=/home/starknet_explorer/madara_explorer/entrypoint.sh | ||
ExecStart=/home/dev/stark_compass_explorer/entrypoint.sh | ||
ExecReload=/bin/kill -HUP | ||
KillSignal=SIGTERM | ||
EnvironmentFile=/home/starknet_explorer/.env | ||
StandardOutput=append:/home/starknet_explorer/logs/starknet_explorer.log | ||
StandardError=append:/home/starknet_explorer/logs/starknet_explorer.log | ||
EnvironmentFile=/home/dev/.env | ||
StandardOutput=append:/home/dev/logs/starknet_explorer.log | ||
StandardError=append:/home/dev/logs/starknet_explorer.log | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
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,3 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
/home/starknet_explorer/madara_explorer/_build/prod/rel/starknet_explorer/bin/starknet_explorer start | ||
/home/dev/stark_compass_explorer/_build/prod/rel/starknet_explorer/bin/starknet_explorer start |