小编the*_*ian的帖子

试图使用Chef来尝试引导Windows服务器

我是一名女孩,正在通过Opscode的托管厨师与我的Rackspace Windows服务器连接刀窗.(我知道,这听起来很奇特,但这些Windows服务器是客户的要求).

我尝试使用Chef进行旋转,但我仍然试图使用knife-windows命令在Rackspace上引导Windows 2008 Server.

我正在开发OSX,使用rvm,ruby 2.1.0和带有chef + knife-windows的本地gemset.

我试图按照以下步骤操作:https: //github.com/opscode/knife-windows

我已经配置了winrm服务.我已经设置了一个规则来允许我的防火墙在端口5985上进行入站连接,并且我验证了我可以使用telnet连接.

除了Learn Chef屏幕演员之外,我还尝试按照指南进行操作:http: //developer.rackspace.com/blog/step-by-step-walkthrough-to-using-chef-to-bootstrap-windows-nodes -on最Rackspace公司,cloud.html

我配置winrm像这样:

winrm quickconfig -q
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="300"}'
winrm set winrm/config '@{MaxTimeoutms="1800000"}'
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
winrm set winrm/config/service/auth '@{Basic="true"}'
netsh advfirewall firewall add rule name="WinRM 5985" protocol=TCP dir=in localport=5985 action=allow
netsh advfirewall firewall add rule name="WinRM 5986" protocol=TCP dir=in localport=5986 action=allow
net stop winrm
sc config winrm start=auto
net start winrm
Run Code Online (Sandbox Code Playgroud)

我正在使用这样的刀:刀引导窗winrm 168.****-x管理员-P'****'

我收回这个奇怪的日志,没有成功报告,厨师管理控制台中没有出现任何实例....我看到它试图多次插入"#39"字符?

WARNING: Could not load IOV …
Run Code Online (Sandbox Code Playgroud)

windows-server-2008-r2 chef-infra rackspace-cloud winrm knife

7
推荐指数
1
解决办法
8313
查看次数

使用 Grail 插件 spring-security-rest 获取 403 错误 Bearer error="insufficient_scope" #3

我正在尝试使用 Spring 安全性来制作 REST API 的基本示例。我正在使用 Grails 插件 spring-security-rest:2.0.0.M2

我尝试遵循这个优秀的教程,但遇到了范围不足的错误。

我正在定义一个角色 ADMIN_ROLE。成功登录后,我得到一个access_token

我已@Secured(['ROLE_ADMIN'])在 ProjectController 类中添加了标签:

@Secured(['ROLE_ADMIN'])
class ProjectController extends RestfulController {
    static responseFormats = ['json', 'xml']
    ProjectController() {
        super(Project)
    }

    def active() {
        respond Project.findAllByActive(true), view: 'index'
    }
}
Run Code Online (Sandbox Code Playgroud)

我的 UrlMappings 指向 ProjectController:包 dk.mathmagicians.demo

class UrlMappings {

    static mappings = {
        "/$controller/$action?/$id?(.$format)?"{
            constraints {
                // apply constraints here
            }
        }
        "/projects"(resources:"project")
        "/active"(controller: 'project', action: 'active')
        "/"(view: '/index')
        "500"(view: '/error')
        "404"(view: '/notFound')
    }
}
Run Code Online (Sandbox Code Playgroud)

我已经使用过滤器配置了 application.groovy 文件,如下所示 …

grails spring http-status-code-403 spring-security-rest

4
推荐指数
1
解决办法
1万
查看次数

scala中的匿名比较器函数具有解构的元组?

我有一个元组列表,我想根据元组中的第二个元素进行升序排序.我用这段代码做到了:

freqs.sortWith( _._2 < _._2 )
Run Code Online (Sandbox Code Playgroud)

但我不喜欢._2命名,因为我更喜欢第二个参数的名字freqs.sortWith( _.weight < _.weight ).任何想法如何做到这一点?

scala

0
推荐指数
1
解决办法
73
查看次数