[Deployment] What do you use?

agolangf · · 626 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>I have a web app that consists of a web server, back end APIs written in Go, nginx, redis, mongodb, and elasticsearch.</p> <p>I want to automate the deployment process to satisfy two goals. First, to do the initial deployment. Second, to re-deploy with minimal down time.</p> <p>Is anyone willing to share their experiences with different solutions? Is something like Ansible or Salt more complexity than I need?</p> <hr/>**评论:**<br/><br/>bbrazil: <pre><p>You&#39;ve at least 7 services there, three of which are databases (which are extra fun). You&#39;re likely well past the point that you need a configuration management system of some form. When I was investigating this over a year ago I looked at Puppet, Salt, Chef and Ansible and ended up using Ansible. This came down to it&#39;s docs being much easier to understand, and the design didn&#39;t have any obvious scaling issues in terms of config expressiveness that the others had.</p> <p>Though it turns out Ansible is only okay in terms of expressiveness (by which I mean the levels of exceptions, mixins and inheritance you need to manage a non-trivial configuration), something like <a href="http://flabbergast.org" rel="nofollow">http://flabbergast.org</a> would be really nice to be able to hook in when things get really complex.</p></pre>seufert: <pre><p>Will all be on one Server with one instance of each? You have an automated build and testt? What&#39;s your deployment target? Cloud? Own Server?</p></pre>ecmdome: <pre><p>Have you looked at Kubernetes? I&#39;ve recently been playing with it on AWS and started on Google Container Engine today... Really loving it so far </p></pre>FIuffyRabbit: <pre><p>Not sure how relevant this is for you but my website is hosted in a private repository and when I push changes, it notifies a hook url which pulls the new version and builds it. As for blog posts and database entries, I submit them as markdown files right now and generate them after the build. </p></pre>joeshaw: <pre><p>We use Docker for packaging all of our services, and use a tool we built called Galaxy (<a href="https://github.com/litl/galaxy" rel="nofollow">https://github.com/litl/galaxy</a>) to manage and deploy them. Although there is definitely a learning curve to Docker and containers I very much like the ability to completely separate the concerns of different pieces of software without any cross-contamination and without the overhead of a VM.</p> <p>We also use Ansible to bootstrap new hosts. (We run on AWS but our base AMI is pretty bare bones.) This does things like install Docker and Galaxy, install ssh keys, and other system configuration tweaks to harden it. We do this largely because it&#39;s much easier to do after the fact than tweak the AMI, and our configuration management can be stored and tracked in git.</p> <p>Galaxy handles the deployment and management of the Docker containers. It includes a load balancing reverse proxy called Shuttle which takes care of the zero downtime issue. It brings up the new containers, drains connections from the old ones, then shuts them down. Depending on your setup, shuttle might be able to replace nginx in your environment. (Or perhaps nginx would use shuttle as its backend proxy targets.)</p> <p>Kubernetes is another option in the same vein, and it&#39;s great software, but it sounds like it&#39;s probably more complicated than you need. (Galaxy might be, too.)</p> <p>In our old system we just used Ubuntu Lucid and used puppet for configuration management and a set of custom scripts for deployment. It was a lot ricketier, suffered from bitrot as Lucid aged and newer software wouldn&#39;t run on it, and even with virtualenv we had issues where trying to upgrade something would break something else. I&#39;m very happy that we switched to containers.</p></pre>

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

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