# netadmin **Repository Path**: orchidinfo/netadmin ## Basic Information - **Project Name**: netadmin - **Description**: 远程配置cisco,juniper - **Primary Language**: Go - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2018-12-10 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Netadmin ## Netadmin 是什么? - Netadmin是一个提供给网络工程师远程执行交换机命令的后台工具,现支持juniper,cisco.采用[beego](https://beego.me/)和[FastAdmin](http://fastadmin.net)开发 - Netadmin 只是一个提供设备管理,脚本管理,用户管理,角色管理,gitlab库管理,定时任务管理的平台 - 采用gitlab作为脚本的存储库,Netadmin通过调用gitlab的API接口进行,仓库,脚本等管理,使用前需要在gitlab先建立对应的user和token - 脚本或者单个命令将被发送至驱动服务 [netadmin-driver](https://gitee.com/pippozq/netadmin-driver)进行执行 ## 开发库 Package | Page ---|--- Beego| https://github.com/astaxie/beego FastAdmin-html | https://github.com/karsonzhang/fastadmin-html ## 警告说明 详细阅读并且遵照FastAdmin-html的相关条款 FastAdmin-html版本不支持商业用途,详情查阅[Details](https://github.com/karsonzhang/fastadmin-html) ## 采用docker方式部署 Gitlab ``` docker run -d --hostname gitlab --publish 8443:443 --publish 8080:80 --publish 2222:22 --name gitlab --restart always --privileged=true --env TZ=Asia/Shanghai -v /opt/gitlab/config:/etc/gitlab -v /opt/gitlab/logs:/var/log/gitlab -v /opt/gitlab/data:/var/opt/gitlab gitlab/gitlab-ce:latest ``` ## 编译构建 首先复制conf/app.conf.example 到 conf/app.conf,而后更新以下内容 ``` # Netadmin Database user = "netadmin" password = "nfsetso12fdds9s" db_name = "netadmin" host = "postgres_host" // your host port = "5432" max_idle_conn = 20 max_open_conn = 50 # debug debug = false # netadmin driver netadmin_driver_url = "http://host:port/netdriver" // netadmin driver url # session sessionproviderconfig = "redis_host:redis_port" // redis host port sessionhashkey = "abcdefghijklmnopqrstuvwxyz" // use your hashkey ``` 通过Dockerfile构建镜像 ``` docker build -t /netadmin: . ``` 在docker中运行 ``` docker run -d --name netadmin -p 8081:8081 -p 8088:8088 -e ENV_MODE=dev /netadmin: ``` ENV_MODE 是配置文件中的环境变量. 详情查看 [app.conf.example](https://gitee.com/pippozq/netadmin/blob/master/conf/app.conf.example) --- http://ip:8081 是 netadmin console http://ip:8081/swagger 是swagger文档 http://ip:8088 beego提供的后台管理 --- 默认用户 ``` name:admin password:password ``` ## License source code is licensed under the Apache Licence, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html).