Completed DynamoDB + DAX Benchmarker with a nice TUI to boot
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
- name: Add Docker's official GPG key
|
||||
apt_key:
|
||||
url: https://download.docker.com/linux/ubuntu/gpg
|
||||
keyring: /etc/apt/keyrings/docker.gpg
|
||||
|
||||
- name: Set up docker APT repository
|
||||
apt_repository:
|
||||
repo: "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable"
|
||||
|
||||
- name: Install the required APT dependencies
|
||||
apt:
|
||||
update_cache: yes
|
||||
name:
|
||||
- docker-ce
|
||||
- docker-ce-cli
|
||||
- docker-compose
|
||||
- containerd.io
|
||||
- docker-compose-plugin
|
||||
- jq
|
||||
- unzip
|
||||
- curl
|
||||
- git
|
||||
@@ -0,0 +1,26 @@
|
||||
- name: Check if AWS CLI is installed
|
||||
shell:
|
||||
cmd: hash aws 2> /dev/null
|
||||
ignore_errors: yes
|
||||
changed_when: no
|
||||
register: awscli_installation_status
|
||||
|
||||
- block:
|
||||
- name: Download the AWS CLI from AWS
|
||||
unarchive:
|
||||
src: https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip
|
||||
dest: "{{ ansible_env.HOME }}/Downloads"
|
||||
group: "{{ user_name }}"
|
||||
owner: "{{ user_name }}"
|
||||
remote_src: yes
|
||||
|
||||
- name: Install the AWS CLI
|
||||
shell:
|
||||
cmd: "{{ ansible_env.HOME }}/Downloads/aws/install"
|
||||
|
||||
- name: Cleanup downloaded AWS installation files
|
||||
file:
|
||||
path: "{{ ansible_env.HOME }}/Downloads/aws/"
|
||||
state: absent
|
||||
|
||||
when: awscli_installation_status.rc | int != 0
|
||||
@@ -0,0 +1,15 @@
|
||||
- name: Check if Go is installed
|
||||
shell:
|
||||
cmd: command -v go 2> /dev/null
|
||||
ignore_errors: yes
|
||||
changed_when: no
|
||||
register: go_installation_status
|
||||
|
||||
- name: Install Go 1.20
|
||||
unarchive:
|
||||
src: https://go.dev/dl/go1.20.5.linux-amd64.tar.gz
|
||||
dest: /usr/local
|
||||
creates: /usr/local/go
|
||||
remote_src: yes
|
||||
become: yes
|
||||
when: go_installation_status.rc | int != 0
|
||||
@@ -0,0 +1,25 @@
|
||||
- { import_tasks: aws_cli.yml, become: yes }
|
||||
- import_tasks: rust.yml
|
||||
- import_tasks: go.yml
|
||||
- import_tasks: node.yml
|
||||
- { import_tasks: apt.yml, become: yes }
|
||||
|
||||
- name: Install CDK
|
||||
npm:
|
||||
name: "{{ item }}"
|
||||
global: yes
|
||||
loop:
|
||||
- aws-cdk
|
||||
- typescript
|
||||
|
||||
- name: Check if golangci-lint is installed
|
||||
shell:
|
||||
cmd: command -v golangci-lint 2> /dev/null
|
||||
ignore_errors: yes
|
||||
changed_when: no
|
||||
register: golangci_lint_installation_status
|
||||
|
||||
- name: Install golangci-lint
|
||||
shell:
|
||||
cmd: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /usr/local/bin v1.53.3
|
||||
when: golangci_lint_installation_status.rc | int != 0
|
||||
@@ -0,0 +1,34 @@
|
||||
- name: Check if node is installed
|
||||
shell:
|
||||
cmd: hash node 2> /dev/null
|
||||
ignore_errors: yes
|
||||
changed_when: no
|
||||
register: node_installation_status
|
||||
|
||||
- block:
|
||||
- name: Install nvm
|
||||
shell: >
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
|
||||
args:
|
||||
creates: "{{ ansible_env.HOME }}/.nvm/nvm.sh"
|
||||
|
||||
- name: Install Node.JS
|
||||
shell:
|
||||
cmd: |
|
||||
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
||||
nvm install node
|
||||
|
||||
- name: Add NVM exports to bashrc
|
||||
lineinfile:
|
||||
path: "{{ ansible_env.HOME }}/.bashrc"
|
||||
line: 'export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"'
|
||||
regexp: '^export NVM_DIR=.+'
|
||||
|
||||
- name: Add NVM script to bashrc
|
||||
lineinfile:
|
||||
path: "{{ ansible_env.HOME }}/.bashrc"
|
||||
line: '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"'
|
||||
regexp: '\[ -s |\$NVM_DIR/nvm\.sh \].+'
|
||||
|
||||
when: node_installation_status.rc | int != 0
|
||||
@@ -0,0 +1,11 @@
|
||||
- name: Check if rustup is installed
|
||||
shell:
|
||||
cmd: command -v rustup 2> /dev/null
|
||||
ignore_errors: yes
|
||||
changed_when: no
|
||||
register: rustup_installation_status
|
||||
|
||||
- name: Install Rust via Rustup
|
||||
shell: >
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
when: rustup_installation_status.rc | int != 0
|
||||
Reference in New Issue
Block a user