Automatic built a Golang development, staging and production environments

blov · · 548 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>What are bests practices to build Golang servers that will be used for development, staging or production environment? What OS level packages, monitoring services, backup software I need? How to standardize and How we could automatize that process. I&#39;ll give some tags here but I think a full explanation is needed. Vagrant, #Packer, #Ansible, #munin, #nagios, #rsnapshot</p> <hr/>**评论:**<br/><br/>kjk: <pre><p>It&#39;s &#34;it depends&#34; question. </p> <p>Depends on size of your project, stage of your project, how many people are involved.</p> <p>Reality is that those things evolve as things progress. Trying to do create perfect setup from the start is a mistake.</p> <p>I start with only dev. It takes a bit of time and programming before a project is ready to be deployed in production at all.</p> <p>When that time comes, I write a deploy script, to automate deployment. Usually I develop on mac and deploy to Linux, either Ubuntu or CoreOS (<a href="https://blog.kowalczyk.info/article/5/blueprint-for-deploying-web-apps-on-coreos.html" rel="nofollow">https://blog.kowalczyk.info/article/5/blueprint-for-deploying-web-apps-on-coreos.html</a>).</p> <p>If the project doesn&#39;t need complicated setup, there&#39;s nothing to do for dev - it&#39;s just running executable on my mac. I don&#39;t complicate things with staging.</p> <p>If my website requires a database, for dev I set it up locally, with docker (<a href="https://blog.kowalczyk.info/article/w4re/using-mysql-in-docker-for-local-testing-in-go.html" rel="nofollow">https://blog.kowalczyk.info/article/w4re/using-mysql-in-docker-for-local-testing-in-go.html</a>).</p> <p>If things are getting more complicated, I might go full docker for dev setup, to make it more like production.</p> <p>At this point there&#39;s infinite variety possible. If you have tens of programmers, a complicated setup, you&#39;ll need someone dedicated just to setting up and managing dev/staging/production. </p> <p>There&#39;s no unification at this point because there are too many variations and unique demands and too many possible services to use (GCP vs. AWS vs. Azure vs. Digital Ocean, datadog vs. new relic vs. prometheus etc.)</p></pre>tmornini: <pre><p>We have an automated process to build, Dockerize, and test our microservices.</p> <p>We get identical results locally on MacOS X and Travis CI.</p> <p>Travis further builds AWS CloudFormation ECS environments per branch (upon request via a git comments) and deploys the tested containers into said environment.</p> <p>It&#39;s been really great to have a history of our infrastructure right in git.</p></pre>mezgani: <pre><p>Please could you give more details about tools you use to automate maybe you do that with capistrano, or Fabric... and what you use as built engine ?</p></pre>tmornini: <pre><p>Everything not mentioned was written by us.</p> <p>Unfortunately, not yet open source.</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

548 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传