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": "创建时间"
       }
   ]
}
Tools convert cookies facebook menjadi token facebook.

Tools convert cookies facebook menjadi token facebook.

Muhammad Latif Harkat 2 Jul 17, 2022
A script to forward mass number of media to another group/channel. Heroku deploy

Telegram Forward Script 😇 This is a Script to Forward Large Number of Files to Another Telegram Channel. Star එකක් දාල fork එකක් ගහපියව් 🥴 If You Tr

Anjana Madu 17 Oct 21, 2022
AWS SDK for Python

Boto3 - The AWS SDK for Python Boto3 is the Amazon Web Services (AWS) Software Development Kit (SDK) for Python, which allows Python developers to wri

the boto project 7.8k Jan 08, 2023
Pls give vaccine.

Pls Give Vaccine A script to spam yourself with vaccine notifications. Explore the docs » View Demo · Report Bug · Request Feature Table of Contents A

Rohan Mukherjee 3 Oct 27, 2021
A discord bot that manages your server's hedge fund

Can't Hide Money Bot A discord bot that manages your server's hedge fund Installing Install wkhtmltopdf sudo apt-get install wkhtmltopdf OR brew insta

Kelvin Abrokwa-Johnson 0 Oct 16, 2021
IOGen - An Open source discord token generator

_____ ____ _____ |_ _/ __ \ / ____| | || | | | |

0xVichy#1234 85 Nov 03, 2022
A Simple Telegram Inline Torrent Search Bot by @infotechIT

Torrent-Search-RoBot A Simple Telegram Inline Torrent Search Bot by @infotechIT. Torrent API Using api.infotech.wtf API Host Bot Deploy to Heroku Clic

InfoTech 0 May 05, 2022
historical code from reddit.com

This repository is archived. This repository is archived and will not receive any updates or accept issues or pull requests. To report bugs in reddit.

The Reddit Archives 16.3k Dec 31, 2022
Forked from 0x36 on github who then rewrote the ida_kernelcache python framework

Forked from 0x36 on github who then rewrote the ida_kernelcache python framework. Sadly 0x36 doesn't seem to have push updates to the project and it took me a very long time to figure out why this wa

Turnerhackz1 6 Dec 13, 2022
Modular Telegram bot running on Python

Modular Telegram bot running on Python

Jefanya Efandchris 1 Dec 26, 2021
Bot for automated buying boxes on Binance

V 1.0 Bot for automated buying boxes on Binance В settings.py выставляем свои COOKIE и свой CSRFTOKEN В settings.py для headers выставляем свои параме

Matvey 3 Jan 18, 2022
Terminal Bot which will Execute your Commands From telegram bot!

Terminal-Bot see this bot alive: https://t.me/HerokuTerminal_Bot With this bot you can execute system commands on your server. how to config? clone or

Moshe 41 Dec 09, 2022
Slack Developer Kit for Python

Python Slack SDK The Slack platform offers several APIs to build apps. Each Slack API delivers part of the capabilities from the platform, so that you

SlackAPI 3.5k Jan 02, 2023
Project template for using aws-cdk, Chalice and React in concert, including RDS Postgresql and AWS Cognito

What is This? This repository is an opinonated project template for using aws-cdk, Chalice and React in concert. Where aws-cdk and Chalice are in Pyth

Rasmus Jones 4 Nov 07, 2022
Crypto Signal Provider - A web application that allows users to select a cryptocurrency

Crypto_Signal_Provider This is a web application that allows users to select a c

Raul 2 Dec 11, 2022
GitHub Activity Generator - A script that helps you instantly generate a beautiful GitHub Contributions Graph for the last year.

GitHub Activity Generator A script that helps you instantly generate a beautiful GitHub Contributions Graph for the last year. Before 😐 😶 😒 After ?

1 Dec 30, 2021
With this simple app you can customize your presence in Discord.

Discord Rich Presence This a simple console app which can customize your Discord Presence easily, with only one config file! Setup Go to Discord Devel

Mai 1 Jan 06, 2022
Minecraft checker

This Project checks if a minecraft account is a nfa/sfa account or invalid it also says you if the ip you are using is shadow banned from minecraft (shadow bann is if you send too many login attempts

baum1810 4 Oct 03, 2022
Código que verifica se o grafo é Hamiltoniano (Em Python)

Código para encontrar um ciclo de Hamilton em um dado grafo e a partir daí verificar se o grafo é hamiltoniano. Um ciclo hamiltoniano é um ciclo gerad

Hemili Beatriz 1 Jan 08, 2022
An unofficial client library for Google Music.

gmusicapi: an unofficial API for Google Play Music gmusicapi allows control of Google Music with Python. from gmusicapi import Mobileclient api = Mob

Simon Weber 2.5k Dec 15, 2022