https://github.com/bulletdev/infra-automation
Automação de infra com Perl e golang
https://github.com/bulletdev/infra-automation
devops go perl prometheus svelte
Last synced: about 1 month ago
JSON representation
Automação de infra com Perl e golang
- Host: GitHub
- URL: https://github.com/bulletdev/infra-automation
- Owner: Bulletdev
- License: other
- Created: 2025-02-24T03:33:06.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2025-02-24T03:33:44.000Z (10 months ago)
- Last Synced: 2025-02-26T07:51:26.576Z (10 months ago)
- Topics: devops, go, perl, prometheus, svelte
- Language: Go
- Homepage:
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🏗️ Ferramenta de Automação de Infraestrutura



## 📋 Índice
- [Sobre](#-sobre)
- [Tecnologias](#-tecnologias)
- [Requisitos](#-requisitos)
- [Instalação](#-instalação)
- [Configuração](#-configuração)
- [Uso](#-uso)
- [API](#-api)
- [Scripts](#-scripts)
- [Contribuição](#-contribuição)
- [Licença](#-licença)
## 💡 Sobre
Esta ferramenta combina a eficiência do Go com a versatilidade do Perl para criar uma solução robusta de gerenciamento de servidores e serviços.
A interface web amigável, construída com Svelte, proporciona uma experiência intuitiva para operações de infraestrutura.
## 🛠 Tecnologias
- **Backend**: Go 1.21+
- **Scripts**: Perl 5.32+
- **Frontend**: Svelte 4
- **API**: Gin Framework
- **Monitoramento**: Prometheus
- **Logging**: Loki
## 📋 Requisitos
- Go 1.21 ou superior
- Perl 5.32 ou superior
- Node.js 18+ e npm
- Docker (opcional)
## 🚀 Instalação
```bash
# Clone o repositório
git clone https://github.com/bulletdev/infra-automation.git
cd infra-automation
# Instale as dependências do Go
go mod download
# Instale os módulos Perl necessários
cpan install JSON
cpan install Getopt::Long
# Instale as dependências do frontend
cd frontend
npm install
```
## ⚙ Configuração
1. **Configuração do Backend**
```bash
# Crie o arquivo de configuração
cp config.example.yaml config.yaml
# Ajuste as variáveis de ambiente
export INFRA_API_PORT=8080
export PERL_SCRIPTS_PATH=/path/to/scripts
```
2. **Configuração dos Scripts**
```bash
# Dê permissão de execução aos scripts Perl
chmod +x scripts/*.pl
# Configure o path dos scripts no config.yaml
scripts_path: /path/to/scripts
```
## 📦 Uso
1. **Inicie o Backend**
```bash
go run main.go
```
2. **Inicie o Frontend**
```bash
cd frontend
npm run dev
```
3. **Acesse a Interface**
Abra seu navegador e acesse `http://localhost:5173`
## 🔗 API
### Endpoints
| Método | Endpoint | Descrição |
|--------|----------|-----------|
| GET | `/health` | Verificação de saúde da API |
| POST | `/execute` | Executa scripts de automação |
### Exemplo de Requisição
```json
{
"script_name": "check_status.pl",
"parameters": {
"action": "check_status",
"target": "server1.example.com",
"verbose": "1"
}
}
```
## 📜 Scripts
### Scripts Disponíveis
- `check_status.pl`: Verifica o status de servidores
- `deploy_app.pl`: Automatiza deploy de aplicações
- `backup_data.pl`: Realiza backup de dados
### Exemplo de Uso Direto
```bash
./scripts/check_status.pl --action check_status --target server1.example.com --verbose
```
## 🤝 Contribuição
1. Faça um Fork do projeto
2. Crie sua Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit suas mudanças (`git commit -m 'Add some AmazingFeature'`)
4. Push para a Branch (`git push origin feature/AmazingFeature`)
5. Abra um Pull Request
## 📄 Licença
Este projeto está sob a licença MIT. Veja o arquivo [LICENSE](LICENSE) para mais detalhes.
---
Desenvolvido com ❤️ pelo melhor devops da Bahia
[Reportar Bug](https://github.com/bulletdev/infra-automation/issues) · [Solicitar Feature](https://github.com/bulletdev/infra-automation/issues)