Skip to content

goldeagle/ansible-collection-devops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Collections - thinkphp_tech.thinkphp | 中文

Ansible collections for thinkphp (v6.x) framework

Table of Contents

  1. Description
  2. Technical Overview
    2.1. Metrics
    2.2. Supported OSs
  3. Quick Start
  4. Software Lists
    4.1. Mesh
    4.2. Services & Metrics
    4.3. Languanges
    4.5. Misc

1. Description

Ansible collections for thinkphp (v6.x) framework, with swoole & pecl & composer installation.

2. Technical Overview

2.1. Metrics

  • grafana - metric gui frontend
  • loki - metric tsdb for log
  • influxdb - tsdb
  • prometheus - tsdb & exporters

2.2. Tested OSs

  • Debian
  • Ubuntu
  • Kali
  • CentOS
  • Fedora
  • Gentoo
  • MacOS

3. Quick Start

3.1. Install ansible

First of all, install "ansible"

  • Linux:
$ apt install ansible
  • MacOS:
$ brew install ansible

3.2. Add a user for 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 }}

3.3. Install this collection

Install this collection:

$ ansible-galaxy collection install thinkphp_tech.thinkphp

3.4. Create a playbook file to use the collection

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

4. Software Lists

4.1. Mesh

  • traefik
  • maesh
  • kubernetes

4.2. Services & Metrics

  • influxdb
  • chronograf
  • grafana
  • https (cargo)
  • loki
  • prometheus
  • gitea

4.3. Languanges

  • rust
  • go
  • deno

4.4. Misc

  • fd-find (cargo)
  • bat (cargo)
  • glances
  • mdbook (cargo)
  • neofetch
  • ranger
  • siege
  • tokei
  • vue
  • tig
  • zsh

About

Ansible collections for DevOps with bitseed tech. stack.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published