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": "创建时间"
       }
   ]
}
Fully automated Chegg Discord bot for "homework help"

cheggbog Fully automated Chegg Discord bot for "homework help". Working Sept 15, 2021 Overview Recently, Chegg has made it extremely difficult to auto

Bryce Hackel 8 Dec 23, 2022
Google Search Results via SERP API pip Python Package

Google Search Results in Python This Python package is meant to scrape and parse search results from Google, Bing, Baidu, Yandex, Yahoo, Home depot, E

SerpApi 254 Jan 05, 2023
A simple healthcheck wrapper to monitor Kafka.

kafka-healthcheck A simple healthcheck wrapper to monitor Kafka. Kafka Healthcheck is a simple server that provides a singular API endpoint to determi

Rodrigo Nicolas Garcia 3 Oct 17, 2022
A Telegram Userbot to play Audio and Video songs / files in Telegram Voice Chats

TG-MusicPlayer A Telegram Userbot to play Audio and Video songs / files in Telegram Voice Chats. It's made with PyTgCalls and Pyrogram Requirements Py

Mᴏᴏɴʟɪɢʜᴛ 4 Dec 14, 2022
Randomly selects two teams based on who is in a voice channel on Discord

TeamPickerDiscordBot Randomly selects two teams based on who is in a voice channel on Discord What I Learned The ins and outs of Python as this was my

Brecken Enneking 2 Jan 27, 2022
A customizable, multilanguage Telegram shop bot with Telegram Payments support

Greed A customizable, multilanguage Telegram shop bot with Telegram Payments support! Demo Send a message to @greedtestbot on Telegram to view a demo

Stefano Pigozzi 328 Dec 29, 2022
This app is providing you to track some online products' prices via GMAIL.

Price Tracking App variables and descriptions of that code is in Turkish language. but we're working on translate them into English. This app is provi

Abdullah Aslan 1 Dec 11, 2021
SEMID - OSINT module with lots of discord functions

SEMID Framework About Semid is a framework with different Discord functions and

Hima 20 Sep 23, 2022
The wrapper you need for the osu!api v2

oppy (op.py) oppy is the wrapper for use on the osu! v2 API. Version 1.0.0 Installation To install please use pip to install oppy pip install op.py To

Wayde 2 May 01, 2022
Telegram bot for downloading covid-19 vaccine certificate

cowin-certificate-bot This is the source code of @cowincertbot, A telegram bot inspired by the whatsapp bot implementation of indian government for co

ArUn Pt 30 Oct 07, 2022
It was increasingly cumbersome to eye-grep CF output in the AWS console.

cfplot Overview It was increasingly cumbersome to eye-grep CF output in the AWS console. I couldn't find another tool out there to provide individual

46 Dec 26, 2022
A telegram bot for generate fake details. Written in python using telethon

FakeDataGenerator A telegram bot for generate fake details. Written in python using telethon. Mandatory variables API_HASH Get it from my telegram.org

Oxidised-Man 6 Dec 19, 2021
A simple discord bot written in python which can surf subreddits, send a random meme, jokes and also weather of a given place

A simple Discord Bot A simple discord bot written in python which can surf subreddits, send a random meme, jokes and also weather of a given place. We

1 Jan 24, 2022
RedFish API Toolkit

RedFish API Toolkit RedFish API Toolkit Build Status GitHub Actions Travis CI Requirements requirements.txt requirements-dev.txt Dependencies Document

Larry Smith Jr. 1 Nov 20, 2021
trading strategy for freqtrade crypto bot it base on CDC-ActionZone

ft-action-zone trading strategy for freqtrade crypto bot it base on CDC-ActionZone Indicator by piriya33 Clone The Repository if you just clone this r

Miwtoo 17 Aug 13, 2022
ShadowClone allows you to distribute your long running tasks dynamically across thousands of serverless functions and gives you the results within seconds where it would have taken hours to complete

ShadowClone allows you to distribute your long running tasks dynamically across thousands of serverless functions and gives you the results within seconds where it would have taken hours to complete

240 Jan 06, 2023
Andrei 1.4k Dec 24, 2022
A bot to display per user data from the Twitch Leak

twitch-leak-bot-discord A bot to display per user data from the Twitch Leak by username Where's the data? I can't and don't want to supply the .csv's

SSSEAL-C 0 Nov 08, 2022
A discord bot with information and template tracking for pxls.space.

pyCharity A discord bot with information and template tracking for pxls.space. Inspired by Mikarific's Charity bot. Try out the beta version on your s

1 Dec 03, 2021
A Telegram user bot to count telegram channel subscriber or group member.

Subscriber Count Userbot A Telegram user bot to count telegram channel subscriber or group member. This tool is only for educational purpose. You coul

IDNCoderX 8 Nov 30, 2022