【问题标题】:Deployment with Chef by using chef-solo: Error node.json使用 chef-solo 与 Chef 一起部署:错误 node.json
【发布时间】:2018-09-08 07:12:36
【问题描述】:

我想开始使用chef-solo 部署组件。 我已经使用 yum 安装了 Chef Client(包括 chef-solo)和所需的 RPM 工件。

我还配置了solo.rbnode.json

执行命令后:chef-solo -c solo.rb -j node.json 我收到以下错误消息:FATAL: Cannot load configuration from node.json

我是这方面的新手,所以我很感激任何帮助。非常感谢。

我的 node.json 的内容:

{
  "fqdn":"bender",
  "mysql":{
    "allow_remote_root":true,
    "bind_address":"xxx.x.x.x",
    "use_upstart":false,
    "server_repl_password":"xxx",
    "server_debian_password":"xxx",
    "server_root_password":"xxx",
    "tunable":{
      "wait_timeout":"7200"
    },
    "client": {
      "packages": ["mysql-community-client", "mysql-community-devel"]
    },
    "server": {
      "packages": ["mysql-community-server"]
    }
  },
  "coremedia":{
    "db":{
      "schemas":["cm7management",
                 "cm7master",
                 "cm7replication",
                 "cm7caefeeder",
                 "cm7mcaefeeder"]
    },
    "yum":{
      "local": {
        "path": "/opt/git/cm8-hamburg-de/boxes/target/shared/rpm-repo/",
        "archive": "/opt/git/cm8-hamburg-de/boxes/target/shared/rpm-repo/"
      }
    },
    "content_archive_url":"/opt/git/cm8-hamburg-de/boxes/target/shared/content/content-users.zip",
    "content_archive":"/opt/git/cm8-hamburg-de/boxes/target/shared/content/content-users.zip",

    "configuration":{
      "configure.STUDIO_TLD":"bender",
      "configure.DELIVERY_TLD":"bender",
      "configure.CROWD_APP_NAME":"admin",
      "configure.CROWD_PASSWORD":"x",
      "configure.CROWD_SERVER":"Crowd Server:8443",
      "configure.ELASTIC_MAIL_HOST":"webserver@testhh.de",
      "configure.DELIVERY_REPOSITORY_HTTP_PORT":"42080",
      "configure.DELIVERY_SOLR_PORT":"44080"
    },
    "logging":{
      "default":{
        "com.coremedia":{"level":"info"},
        "cap.server":{"level":"info"},
        "hox.corem.server":{"level":"info"},
        "workflow.server":{"level":"info"}
      }
    },
    "tomcat":{
      "manager":{
        "credentials":{
          "admin":{
            "username":"admin",
            "password" : "x",
            "roles"    : "manager-gui"
          },
 "script": {
            "username" :"script",
            "password" : "x",
            "roles"    : "manager-jmx,manager-script"
          }
    }
      }
    }
  },
  "run_list":[
  "recipe[blueprint-yum::default]",
  "recipe[coremedia::chef_logging]",
  "recipe[coremedia::reporting]",
  "recipe[mysql::server]",
  "recipe[coremedia::db_schemas]",
  "recipe[mongodb::default]",
  "recipe[coremedia::solr_master]",
  "recipe[coremedia::master_live_server]",
  "recipe[coremedia::content_management_server]",
  "recipe[coremedia::workflow_server]",
  "recipe[coremedia::caefeeder_preview]",
  "recipe[coremedia::caefeeder_live]",
  "recipe[coremedia::studio]",
  "recipe[coremedia::studio_apache]",
  "recipe[coremedia::certificate_generator]",
  "recipe[coremedia::delivery]",
  "recipe[coremedia::delivery_apache]"
  ]
}

【问题讨论】:

    标签: chef-infra chef-solo cookbook automated-deploy


    【解决方案1】:

    确保 node.json 与运行 chef-solo 的路径相同

    【讨论】:

    • 请将其标记为答案,以便对其他人也有用
    • 感谢您的回答。现在我收到以下错误消息(根据我假设的 coremedia 食谱):Error Resolving Cookbooks for Run List: Missing Cookbooks: Could not satisfy version constraints for: yum Expanded Run List: *blueprint-yum::default *coremedia::chef_logging *coremedia::reporting *mysql::server *coremedia::db_schemas * mongodb::default * coremedia::solr_master你也对这个问题有想法吗?
    • 检查如果您在 solo.rb 中正确提到了食谱路径,如下所示 cookbook_path [ '/var/chef/cookbooks', '/var/chef/site-cookbooks' ] 并确保所有您的主要和从属食谱放置在给定路径中
    • 我检查了cookbook_path 的路径并更新了这些路径。但我仍然收到相同的错误消息。 yum 的版本限制呢?
    猜你喜欢
    • 1970-01-01
    • 2023-03-09
    • 2013-02-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-29
    相关资源
    最近更新 更多