当前位置: 首页 > news >正文

如何制作自己的网站图?大型网站系统

如何制作自己的网站图?,大型网站系统,seo的主要分析工具,网站东莞优化建设前面的文章聊过用 jenkins 做了一个简单的自动化发布#xff0c;在shell中采用的是 BUILD_IDdontKillMe nohup dotnet xxx.dll 这种简单的后台承载#xff0c;如果你的业务量相对比较小#xff0c;可以用这个方法玩一玩#xff0c;但存在二个问题#xff1a;1. 无法… 前面的文章聊过用 jenkins 做了一个简单的自动化发布在shell中采用的是 BUILD_IDdontKillMe nohup dotnet xxx.dll  这种简单的后台承载如果你的业务量相对比较小可以用这个方法玩一玩但存在二个问题1. 无法对进程进行批量或者可视化管理。2. 单机模式下的多副本部署比较麻烦比如你在一台机器上开启多个同样的程序来提高队列的处理能力解决这两个问题你可以使用netcore官方推荐的 supervisor 进程管理工具。一supervisor 具体这玩意是干嘛的我就不说了大家自己看官网http://www.supervisord.org/  接下来快速部署一下。1.  pippip是python的一个包管理器类似于nuget如果你的centos上没有安装那么请执行下面命令。 yum -y install epel-release yum -y install python-pip2. supervisor因为supervisor是python写的所以直接通过pip进行安装即可。 [rootk8s-node1 ~]# pip install supervisor Collecting supervisorDownloading https://files.pythonhosted.org/packages/ba/65/92575a8757ed576beaee59251f64a3287bde82bdc03964b89df9e1d29e1b/supervisor-3.3.5.tar.gz (421kB)100% |████████████████████████████████| 430kB 47kB/s Collecting meld30.6.5 (from supervisor)Downloading https://files.pythonhosted.org/packages/b6/ae/e6d731e4b9661642c1b20591d8054855bb5b8281cbfa18f561c2edd783f7/meld3-1.0.2-py2.py3-none-any.whl Installing collected packages: meld3, supervisorRunning setup.py install for supervisor ... done Successfully installed meld3-1.0.2 supervisor-3.3.5 You are using pip version 10.0.1, however version 18.1 is available. You should consider upgrading via the pip install --upgrade pip command. [rootk8s-node1 ~]# pip install --upgrade pip Collecting pipDownloading https://files.pythonhosted.org/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl (1.3MB)100% |████████████████████████████████| 1.3MB 49kB/s Installing collected packages: pipFound existing installation: pip 10.0.1Uninstalling pip-10.0.1:Successfully uninstalled pip-10.0.1 Successfully installed pip-18.13. supervisord这个就是supervisor的server端启动之前生成一个默认的配置文件放在 /data/supervisor/目录下。 [rootk8s-node1 supervisor]# pwd /data/supervisor [rootk8s-node1 supervisor]# echo_supervisord_conf  ./supervisord.conf [rootk8s-node1 supervisor]# ls supervisord.conf关于配置文件的详细配置你可以参考官方的http://www.supervisord.org/configuration.html [unix_http_server] file/tmp/supervisor.sock[supervisord] logfile/tmp/supervisord.log ; main log file; default $CWD/supervisord.log logfile_maxbytes50MB ; max main logfile bytes b4 rotation; default 50MB logfile_backups10 ; # of main logfile backups; 0 means none, default 10 loglevelinfo ; log level; default info; others: debug,warn,trace pidfile/tmp/supervisord.pid ; supervisord pidfile; default supervisord.pid nodaemonfalse ; start in foreground if true; default false minfds1024 ; min. avail startup file descriptors; default 1024 minprocs200 ; min. avail process descriptors;default 200; The rpcinterface:supervisor p must remain in the config file for ; RPC (supervisorctl/web interface) to work. Additional interfaces may be ; added by defining them in separate [rpcinterface:x] ps.[rpcinterface:supervisor] supervisor.rpcinterface_factory supervisor.rpcinterface:make_main_rpcinterface; The supervisorctl p configures how supervisorctl will connect to ; supervisord. configure it match the settings in either the unix_http_server ; or inet_http_server p.[supervisorctl] serverurlunix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket上面的文件主要改两个地方开启supervisor的可视化界面 ;[inet_http_server] ; inet (TCP) server disabled by default ;port127.0.0.1:9001 ; ip_address:port specifier, *:port for all iface ;usernameuser ; default is no username (open server) ;password123 ; default is no password (open server)改成 [inet_http_server] ; inet (TCP) server disabled by default port0.0.0.0:9001 ; ip_address:port specifier, *:port for all iface ;usernameuser ; default is no username (open server) ;password123 ; default is no password (open server)下面这个语法表示可以加载指定目录的所有ini文件这个口子就方便我们给每个应用程序配一个xx.ini文件这样当你update的时候supervisor会自动 将conf目录下*.ini文件和supervisor.conf进行合并。 ;[include] ;files relative/directory/*.ini改成 [include] files ./conf/*.ini最后启动一下更多的你可以通过help命令查看。[rootk8s-node1 supervisor]# supervisord -c ./supervisord.conf 4. supervisorctlsupervisotctl 是一个客户端工具通过9001端口与server进行交互可处理如下18个命令。 [rootk8s-master supervisord]# supervisorctl helpdefault commands (type help topic):add    exit      open  reload  restart   start   tail    avail  fg        pid   remove  shutdown  status  update  clear  maintail  quit  reread  signal    stop    version接下来可以在conf目录下生成一个 consoleapp3.ini 文件程序名为:consoleapp3。 [rootk8s-master conf]# tail consoleapp3.ini [program:consoleapp3] command/usr/bin/dotnet /data/supervisord/ConsoleApp3/ConsoleApp3.dll autostarttrue autorestarttrue stdout_logfile/data/supervisord/ConsoleApp3/1.log执行以下update命令让supervisor重新加载配置文件。[rootk8s-master supervisord]# supervisorctl update 回到文章开头的问题如果生成多个副本你可以采用group模式比如下面这样的 mytest.ini 文件放置到conf目录下。 [group:mytest] programsmytest1,mytest2,mytest3[program:mytest1] command/usr/bin/dotnet /data/supervisord/mytest/ConsoleApp1.dll autostarttrue autorestarttrue stdout_logfile/data/supervisord/mytest/4.log[program:mytest2] command/usr/bin/dotnet /data/supervisord/mytest/ConsoleApp1.dll autostarttrue autorestarttrue stdout_logfile/data/supervisord/mytest/5.log[program:mytest3] command/usr/bin/dotnet /data/supervisord/mytest/ConsoleApp1.dll autostarttrue autorestarttrue stdout_logfile/data/supervisord/mytest/6.log然后通过 supervisorctl update 让supervisor重新加载配置文件然后可观察可视化界面。 [rootk8s-master conf]# supervisorctl update  mytest: added process group有了这个基础之后和jenkins集成就很简单了因为9001端口被占用就重新指定了一个19001端口把应用程序的*.ini文件放在解决方案里这样自动化的时候就可以找到*.ini文件然后copy到supervisor的conf目录下因为是强制copy所以用管道模式 yes | .....1)普通模式 supervisorctl -s http://localhost:19001 stop memsql-test \cd ./MemSql.NetCore/MemSql.Test \yes | cp ./doc/memsql-test.ini /data/supervisor/conf/ \dotnet publish -o /data/output/MemSql.Test -c Release \supervisorctl -s http://localhost:19001 update \supervisorctl -s http://localhost:19001 start memsql-test2)组模式 supervisorctl -s http://localhost:19001 stop memsql-automationdeploy:* \cd ./MemSql.NetCore/MemSql.AutomationDeploy \yes | cp ./doc/memsql-automationdeploy.ini /data/supervisor/conf/ \dotnet publish -o /data/output/MemSql.AutomationDeploy -c Release \supervisorctl -s http://localhost:19001 update \supervisorctl -s http://localhost:19001 start memsql-automationdeploy:*好了本篇就说到这里如果有人问多机器怎么玩下篇再说ansible~
http://www.zqtcl.cn/news/48911/

相关文章:

  • 网站建设开淘宝直通车手机商城毕业设计
  • 做ppt到哪个网站找图片合肥网站优化步骤
  • 网站忧化工作怎么样wordpress怎么搭建成论坛
  • 厦门安能建设品牌网站建设喀什网站建设百度推广
  • 网站怎么添加百度商桥网站设计用什么字体好
  • 招投标网站什么腾讯网站做任务能刷q币
  • zenm自己做网站织梦 音乐网站
  • 福州网站营销互联网保险发展现状和趋势
  • 营销型企业网站建设规划探讨销售订单管理系统软件
  • 宜昌市夷陵区建设局网站定制开发app方案
  • 最新网站技术沈阳祥云男科
  • 铜陵网站建设推广小程序源码带后台
  • 赤峰专业网站建设表情制作在线生成器
  • 闸北区网站建设网页制作广州越秀区房价2022年最新房价
  • 网站首页的布局中关村哪里可以做网站
  • 做网站6个月心得《网站开发尾款结算》申请
  • 做网站的公司怎么拓展业务黑龙江做网站的公司
  • 上海网站建设微信开发网站建设:博采网络
  • 百度站长收录黑龙江省建设厅
  • asp技术网站开发案例房屋设计图软件免费
  • 怎样用jsp做网站登录秦皇岛网站搜索优化
  • 免费流量网站推广查公司的网站有哪些
  • 名作之壁吧网站建设网站建设方案云盘
  • led论坛网站建设中企动力z邮箱登录入口
  • html5网站动效怎么做linux网站服务器配置
  • 全响应网站制作网上能注册公司吗怎么注册
  • 专业手机网站建设多少钱装修网站模板下载
  • 白城整站优化宁波网站推广平台咨询
  • 天眼查网站建设公司韩国的电商网站
  • 可以投稿的写作网站深圳企业网络推广公司