Ansible Collections - thinkphp_tech.thinkphp | 中文
Ansible collections for thinkphp (v6.x) framework
- Description
- Technical Overview
2.1. Metrics
2.2. Supported OSs - Quick Start
- Software Lists
4.1. Mesh
4.2. Services & Metrics
4.3. Languanges
4.5. Misc
Ansible collections for thinkphp (v6.x) framework, with swoole & pecl & composer installation.
- grafana - metric gui frontend
- loki - metric tsdb for log
- influxdb - tsdb
- prometheus - tsdb & exporters
- Debian
- Ubuntu
- Kali
- CentOS
- Fedora
- Gentoo
- MacOS
First of all, install "ansible"
- Linux:
$ apt install ansible
- MacOS:
$ brew install ansible
Add user:
$ useradd {{ your_ansible_user }}-m -G users,sudo -s /bin/bash
$ passwd
$ mkdir -p ~/.ssh
Generate ssh key pair:
$ ssh-keygen -t rsa -b 4096 -C "{{ your_ansible_user }}"
Deploy the pub key:
$ scp .ssh/id_rsa.pub {{ your_ansible_user }}@{{ target_host }}:~/.ssh/authorized_keys
Test it:
$ ssh -T {{ your_ansible_user }}@{{ target_host }}
Install this collection:
$ ansible-galaxy collection install thinkphp_tech.thinkphp
Then you can use the roles from the collection in your playbooks (playbook.yml etc.):
---
- name : configure and deploy the local servers and app codes
hosts: {{ your_host_group_in_your_inventory }}
remote_user: {{ your_remote_ansible_user }}
become: yes
become_method: sudo
vars:
ansible_python_interpreter: /usr/bin/python3
php_install_composer: true
php_install_pecl: true
php_install_swoole: true
collections:
- goldeagle.devops
roles:
- grafana
- prometheus
Run the playbook:
$ ansible-playbook -i <your_hosts_file> playbook.yml -K
Here are some playbook examples: goldeagle/ansible
- traefik
- maesh
- kubernetes
- influxdb
- chronograf
- grafana
- https (cargo)
- loki
- prometheus
- gitea
- rust
- go
- deno
- fd-find (cargo)
- bat (cargo)
- glances
- mdbook (cargo)
- neofetch
- ranger
- siege
- tokei
- vue
- tig
- zsh