opsSAM:开源运维管理平台

YYGhaHAha 8年前
   <h2>opsSAM</h2>    <p><strong>一、基本环境</strong></p>    <p>os: Centos 6.6 x86_64</p>    <p>python: 2.6.6</p>    <p><strong>二、依赖关系</strong></p>    <p>1、python依赖包</p>    <pre>  pip install -r requirements.txt</pre>    <p>2、epel源rpm安装包</p>    <pre>  mysql-5.5.19    subversion-1.6.11-10    rabbitmq-server-3.1.5-1    cobbler-2.6.3-1</pre>    <p>3、其他接口</p>    <pre>  a)cobbler服务器    cobbler-2.6.3-1.el6.noarch    cobbler-web-2.6.3-1.el6.noarch    b)saltstack服务器    salt 2014.7.2     salt-api-2014.7.2    c)svn服务器    subversion-1.6.11-11</pre>    <p>4、启动数据库</p>    <pre>  a)创建登陆用户    /etc/init.d/mysqld start    mysqladmin -uroot password opsSAM    b)创建数据库:    mysql -uroot -popsSAM -e "create database opsSAM;"    c)生成项目数据表:    cd /your/sitepath/    python manage.py syncdb    d)创建初始登陆用户admin(密码admin):    mysql -uroot -popsSAM -e "insert into opsSAM.opsSAM_users(username,password,admin) values ('admin','f313176847fcc0c82dae8e51e0e40b1d33ec7f0fabf279c164f8541ec99f8a06f473b3b1439a41a898aa2f70f076a59bb671e17bed52471cb9adfee9701a7fb5','是');"</pre>    <p>5、设置django</p>    <pre>  opsSAM.opsSAM.settings.py  opsSAM.opsSAM.settings_local.py</pre>    <p><strong>三、django生产环境安装(非必须)</strong></p>    <p>推荐nginx+uwsgi(略)</p>    <p>安装后按照实际情况修改scripts/supervisord.conf相关django配置</p>    <p>[program:django]</p>    <p>command=/usr/bin/python /your/sitepath/opsSAM/manage.py runserver 0.0.0.0:80</p>    <p><strong>四、启动</strong></p>    <p>cp scripts/supervisord.conf /etc/</p>    <p>cp scripts/supervisord /etc/init.d/</p>    <p>chmod 755 /etc/init.d/supervisord</p>    <p>/etc/init.d/supervisord start</p>    <p><strong>五、访问地址:</strong></p>    <p>opsSAM前台: http://your_ip/</p>    <p>opsSAM后台: http://your_ip/admin</p>    <p>rabbitmq: http://your_ip:15672/</p>    <p>celery flower: http://your_ip:5555/</p>    <p>supervisor: http://your_ip:9001/</p>    <p><strong>六、demo</strong></p>    <p style="text-align: center;"><img src="https://simg.open-open.com/show/fa85ad97e2404447db7ade8ca12d38a3.png"></p>    <p style="text-align: center;"><img src="https://simg.open-open.com/show/29a385586329dfd4e9c2a9d2f5751f6f.jpg"></p>    <p style="text-align: center;"><img src="https://simg.open-open.com/show/e0adbc094c350a2bf954b51a2893a992.png"></p>    <p style="text-align: center;"><img src="https://simg.open-open.com/show/1b9e653879779f8608ac08e077192f3c.png"></p>    <p style="text-align: center;"><img src="https://simg.open-open.com/show/6b1a4c471900f58c6013d4b1407145da.png"></p>    <p style="text-align: center;"><img src="https://simg.open-open.com/show/18dddac09ae3deaf21bb79c8e807e535.png"></p>    <p> </p>    <p> </p>    <p> </p>    <p> </p>