简体   繁体   English

aw opsworks主厨,git克隆

[英]aws opsworks chef, git cloning

I am using AWS opworks chef to test out deployment features and what not. 我正在使用AWS opworks Chef来测试部署功能以及不进行的功能。 I have local git server/repo on the network and i am simply trying to clone a repo to a directory within the instance from that server. 我在网络上有本地git服务器/存储库,我只是想从该服务器将存储库克隆到实例中的目录。 I saw that chef has a resource for git,so in turn i added this to my recipe: 我看到厨师拥有git的资源,因此我又将其添加到了我的食谱中:

git 'test_deploy' do
      repository 'http://git@192.0.0.10/scm/in/test.git'
      revision 'master'
      action :sync
      destination '/home/ubuntu'   
 end

When Opsworks has finished, the instance is 'online' with no errors in the console output : Opsworks完成后,实例处于“在线”状态,控制台输出中没有错误:

[2016-09-19T13:37:01+00:00] INFO: Processing git[test_deploy] action sync (test::default line 38)
[2016-09-19T13:37:02+00:00] INFO: Chef Run complete in 10.401210434 seconds

For a couple days now i had issues trying to get SSH working which to no avail and did not worked, so to tried and go around this i just used HTTP instead and made the repo public(to stop ssh prompt) to see if i can get anything on the instance when the 'setup' phase has been issued through opworks. 几天来,我遇到了一些问题,试图使SSH无法正常工作,但没有成功,所以要尝试解决此问题,我只是使用HTTP来代替,并公开了回购协议(以停止ssh提示符)以查看是否可以通过opworks发出“设置”阶段后,可以获取实例上的任何内容。

Considering there are no errors and when i log into the instance, no source code has been clone to the home user directory??? 考虑到没有错误,并且当我登录到实例时,没有源代码已克隆到主用户目录中??? not sure how to debug this. 不知道如何调试它。 Can anyone help me out here on what i am doing wrong, i dunno why its so finicky to just clone something?? 有人可以帮我解决我做错的事情吗,我不知道为什么克隆某些东西这么挑剔?

PS the chef git resource documentation where that helpful for me (unless i am missing something here) kinda sad there are no clear examples. PS厨师git资源文档,那里对我有帮助(除非我在这里不见了什么),有点遗憾,没有明确的例子。 i did run ruby -c against my rb files to check the sytax which is all good 我确实对我的rb文件运行ruby -c来检查语法,这都很好

Any advice will be must appreciated 任何建议将不胜感激

This was the answer to the initial problem below: 这是下面的最初问题的答案:

@Tensibai adding '/home/ubuntu/test' actually worked :O argh! @Tensibai添加'/ home / ubuntu / test'实际上有效:啊! instead of just doing '/home/ubuntu' this is very subtle it seems, as in the chef aws opworks console it did not actually display the git fatal error of 'directory already exist'. 看起来不仅仅只是执行'/ home / ubuntu',这似乎非常微妙,因为在Chef aws opworks控制台中,它实际上并未显示“目录已存在”的git致命错误。 Rather, it just says the message above stating it executed/ran the git resource successfully.so painful. 相反,它只是说上面的消息表明它成功执行/运行了git资源。 Also i assumed the git clone would create the folder it needs to put the source like the usual process. 我也假设git clone将创建它需要像通常的过程一样放置源的文件夹。 But thankyou for looking at it different way, this problem did catch me out partly cos the chef aws console didnt display that error. 但是谢谢您以不同的方式看待它,这个问题确实使我有些不满意,因为厨师aws控制台没有显示该错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM