1.本项目采用Python Flask框架开发提供(应用管理,实例管理,Ansible管理,LDAP管理等相关功能)

Overview

op-devops-api

1.本项目采用Python Flask框架开发提供(应用管理,实例管理,Ansible管理,LDAP管理等相关功能) 后端项目配套前端项目为:op-devops-ui

jenkinsManager

一.插件python-jenkins bug修复

(1).插件版本 python-jenkins==1.5.0

二.接口文档;

1.基础环境介绍;

软件版本信息 系统/内核信息 项目目录功能介绍
Python 3.6.8 Centos 7.2 tools jekins jobs相关xml配置
Flask1.0.2 3.10.0-862.6.3.el7.x86_64 boot.py flask 程序启动入口文件
python-jekins1.5.0 python jenkins sdk 插件

2.项目系统依赖包安装;
(1).centos 7x系统安装支持包;
yum -y install python36 mysql-devel libxml2* mysql initscripts python36-devel python36-pip python36-setuptools mysql-devel libxml2* mysql initscripts psmisc

(2).安装项目依赖包pip3方式;
/usr/local/bin/pip3.6 install --upgrade pip
/usr/local/bin/pip3.6 install --upgrade setuptools
/usr/local/bin/pip3.6 install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

3.修改项目配置文件 (MYSQL文件) cat config.py #新建数据库并且授权应用程序访问 (如下:op-cicd-api-v2) SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:[email protected]:3306/op-cicd-api-v2'

4.初始化数据库表结构设置授权管理员账号权限 操作流程:初始化数据库表---> 创建管理员账户---> 输入账号密码 $ python3.7 manage.py
usage: manage.py command: init_db -- 初始化数据库 create_admin -- 创建管理员账户 enable_admin -- 启用管理员账户,用于登录失败次数过多账户被禁用时使用

5.登录获取应用token参数如下: token-api 接口文档:

  • 输入用户密码登录获取token

请求URL:

  • http://devops-bmc-api.com/account/users/login/

请求方式:

  • POST

格式:

  • JSON

参数:

参数 必填 类型 说明
username str 系统授权用户名
password str 系统授权用户名
type str 类型分为: standard 系统设置用户 ldap 用户

请求示例

http://devops-bmc-api.com/account/users/login/
{
"username":"admin",
"password":"[email protected]",
"type":"standard"
}

返回参数

http://devops-bmc-api.com/account/users/login/
{
    "data": {
        "is_supper": true,
        "nickname": "管理员",
        "permissions": [],
        "token": "3df9a449d44f4183a45ba9a43cc61fbc"  #Token 有过期时间每一次请求需要带token
    },
    "message": ""
}

6.获取应用信息实例接口 请求URL:

  • http://devops-bmc-api.com/account/users/login/

请求方式:

  • GET

格式:

  • JSON

参数:

header带Token --header

http://127.0.0.1:9000/app/api/v1?appname=op-nginx-api

参数 必填 类型 说明
group str 分组
appname str 应用名称
port str 应用端口
business str 业务线
page int 当前页面
page_size int 每页显示数据多少条

请求示例

curl --location --request GET 'http://127.0.0.1:9000/app/api/v1?appname=op-nginx-api' \
--header 'X-TOKEN: 3df9a449d44f4183a45ba9a43cc61fbc'

响应

{
   "code": 0,
   "total": 1,
   "data": [
       {
           "id": 1,
           "business": "op",
           "group": "op",
           "appname": "op-nginx-api",
           "apptype": "python",
           "giturl": "http://127.0.0.1:9000/ansible/host/v1",
           "owner": "lijx",
           "port": "2222",
           "level": "低",
           "used": "nginx运维测试",
           "createtime": "2021-11-04 16:32:33"
       }
   ],
   "msg": "success",
   "columns": [
       {
           "name": "group",
           "alias": "小组名称"
       },
       {
           "name": "appname",
           "alias": "应用名称"
       },
       {
           "name": "level",
           "alias": "应用级别"
       },
       {
           "name": "apptype",
           "alias": "应用类型"
       },
       {
           "name": "business",
           "alias": "业务线"
       },
       {
           "name": "giturl",
           "alias": "git地址"
       },
       {
           "name": "owner",
           "alias": "应用负责人"
       },
       {
           "name": "port",
           "alias": "服务端口"
       },
       {
           "name": "used",
           "alias": "用途"
       },
       {
           "name": "createtime",
           "alias": "创建时间"
       }
   ]
}
Telegram Bot to learn English by words and more.. ( in Arabic )

Get the mp3 files Extract the mp3.rar on the same file that bot.py on install requirements pip install -r requirements.txt #Then enter you bot token

Plugin 10 Feb 19, 2022
This is a simple grabber written in Python which helps you to grab products from Willhaben.at

Willhaben Grabber This is a simple grabber written in Python which helps you to grab products from Willhaben.at General info The tool generates a sear

Ramo 0 Feb 16, 2022
🤖 Telegram UserBot Untuk Memutar Lagu Dan Video Di Obrolan Suara Telegram.

🤖 Telegram UserBot Untuk Memutar Lagu Dan Video Di Obrolan Suara Telegram.

Fariz 2 Nov 13, 2021
BiliBili-live-barrage-transceiver - A simple python program for sending and receiving barrage in bilibili live room

BiliBili-live-barrage-transceiver - A simple python program for sending and receiving barrage in bilibili live room

zeroy 2 Jan 18, 2022
Telegram Bot to store Posts and Documents and it can Access by Special Links.

Telegram Bot to store Posts and Documents and it can Access by Special Links. I Guess This Will Be Usefull For Many People..... 😇 . Features Fully cu

REX BOTZ 1 Dec 23, 2021
Tracks how much money a profile has in their bank and graphs it, as long as they enable the bank api

Tracks how much money a profile has in their bank and graphs it, as long as they enable the bank api. (you could really use this to track anything from the hypixel api)

1 Feb 08, 2022
Archive tweets and make them searchable

Tweeter Archive and search your tweets and liked tweets using AWS Lambda, DynamoDB and Elasticsearch. Note: this project is primarily being used a tes

Kamil Sindi 8 Nov 18, 2022
A Python client for the Softcite software mention recognizer server

Softcite software mention recognizer client Python client for using the Softcite software mention recognition service. It can be applied to individual

4 Feb 02, 2022
A decentralized messaging daemon built on top of the Kademlia routing protocol.

parakeet-message A decentralized messaging daemon built on top of the Kademlia routing protocol. Now that you are done laughing... pictures what is it

Jonathan Abbott 3 Apr 23, 2022
Tiktok 2 Instagram With Python

Tiktok2Instagram 📸 About The Project What it does: Download the source video from a user inputted Tiktok URL. 📙 Add audio to the Tiktok video from a

Carter Belisle 4 Feb 06, 2022
toldium is a modular, fast, reliable and customizable multiplatform bot library for your communities

toldium The easy multiplatform bot toldium is a modular, fast, reliable and customizable multiplatform bot library for your communities, from a commun

Stockdroid Fans 5 Nov 03, 2021
A Discord Self-Bot in Python

👨‍💻 Discord Self Bot 👨‍💻 A Discord Self-Bot in Python by natrix Installation Run: selfbot.bat Python: version : 3.8 Modules

natrix_dev 3 Oct 02, 2022
Modular Python-based Twitch bot optimized for customizability and ease of use.

rasbot Modular Python-based Twitch bot optimized for customizability and ease of use. rasbot is a Python-based Twitch bot that runs on your Twitch acc

raspy 9 Dec 14, 2022
A simple discord tool that translates english to either spanish, german or french and sends it. Free to rework but please give me credit.

discord-translator A simple discord tool that translates english to either spanish, german or french and sends it. Free to rework but please give me c

TrolledTooHard 2 Oct 04, 2021
Fetch the details of assets hosted on AWS.

onaws onaws is a simple tool to check if an IP/hostname belongs to the AWS IP space or not. It uses the AWS IP address ranges data published by AWS to

Amal Murali 80 Dec 29, 2022
Riffdog Terraform scanner - finding 'things' in the Real World (aka AWS) which Terraform didn't put there.

riffdog Riffdog Terraform / Reality scanner - finding 'things' in the Real World which Terraform didn't put there. This project works by firstly loadi

Riffdog 4 Mar 23, 2020
This will create new discord accounts and add them to your server

Discord-Botter This tool will create new discord accounts add them to your server, this tool needs a captcha api like capmonster.cloud or anti-captcha

Shahzain 27 Nov 30, 2022
Der Dischkort Bot für Andiismus

AndreOS Der Dischkort Bot für Andiismus Wichtigger Bot für den hauseigenen Discord-Server Indoktrinationsmechanismusleitungsprogramm der andiistischen

Leon Bartle 3 Jan 13, 2022
Fully asynchronous trace.moe API wrapper

AioMoe Fully asynchronous trace.moe API wrapper Installation You can install the stable version from PyPI: $ pip install aiomoe Or get it from github

2 Jun 26, 2022
A discord.py bot template with easy deployment through Github Actions

discord.py bot template A discord.py bot template with easy deployment through Github Actions. You can use this template to just run a Python instance

Thomas Van Iseghem 1 Feb 09, 2022