<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'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's "it depends" 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't need complicated setup, there's nothing to do for dev - it's just running executable on my mac. I don'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's infinite variety possible. If you have tens of programmers, a complicated setup, you'll need someone dedicated just to setting up and managing dev/staging/production. </p>
<p>There'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'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
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传