Code Monkey home page Code Monkey logo

terraform-aws-watchmaker's Issues

Don't install cfnbootstrap if already installed

Everything in this section is installing and setting up the cfn bootstrap utility. Affects both lx-instance and lx-autoscale modules.

Propose testing first if the utility is already installed and installing only if it is not present. Here's what I think is a reasonable test:

if [[ $(rpm --quiet -q aws-cfn-bootstrap || pip show --quiet aws-cfn-bootstrap)$? -ne 0 ]]
then
  # do install
fi

AWS::CloudFormation::Init Stanza "install-cloudwatch-agent"

Current logic:

"01-get-cloudwatch-agent": {
  "command": {
    "Fn::Join": [
      "",
      [
        "mkdir -p /etc/cfn/scripts/ &&",
        " aws s3 cp ",
        { "Ref": "CloudWatchAgentUrl" },
        " /etc/cfn/scripts/AmazonCloudWatchAgent.zip",
        " --region ",
        { "Ref": "AWS::Region" },
        " &&",
        " chown root:root /etc/cfn/scripts/AmazonCloudWatchAgent.zip &&",
        " chmod 700 /etc/cfn/scripts/AmazonCloudWatchAgent.zip"
      ]
    ]
  }
},

Can be more-compactly expressed/require fewer linked commands:

"01-get-cloudwatch-agent": {
  "command": {
    "Fn::Join": [
      "",
      [
        "install -Dbm 700 -o root -g root /dev/null /etc/cfn/scripts/AmazonCloudWatchAgent.zip &&
        " aws s3 cp ",
        { "Ref": "CloudWatchAgentUrl" },
        " /etc/cfn/scripts/AmazonCloudWatchAgent.zip",
        " --region ",
        { "Ref": "AWS::Region" }
      ]
    ]
  }
},

Initial Update

The bot created this issue to inform you that pyup.io has been set up on this repo.
Once you have closed it, the bot will open pull requests for updates as soon as they are available.

Using an Asterisk in the "CloudWatchAppLogs" parameter errors CWL Log Stream creation

Output seen in CloudWatch Agent Logs:

2019-07-05T22:05:19Z E! CreateLogStream / CreateLogGroup with log group name /aws/ec2/lx/devxx-bxx stream name install_*_logs_i-xxxxx has errors. Will retry the request: InvalidParameterException: 1 validation error detected: Value 'install_*_logs_i-xxxxx' at 'logStreamName' failed to satisfy constraint: Member must satisfy regular expression pattern: [^:*]*

Dependabot couldn't find a <anything>.tf for this project

Dependabot couldn't find a .tf for this project.

Dependabot requires a .tf to evaluate your project's current Terraform dependencies. It had expected to find one at the path: /modules/<anything>.tf.

If this isn't a Terraform project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

Dependabot couldn't find a <anything>.tf for this project

Dependabot couldn't find a .tf for this project.

Dependabot requires a .tf to evaluate your project's current Terraform dependencies. It had expected to find one at the path: /modules/**/<anything>.tf.

If this isn't a Terraform project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

Seems Like watchmaker-lx-autoscale.template.cfn.json Implements a Bad Assumption

Recently rebased [cfn-gitlab() against the current watchmaker-lx-autoscale.template.cfn.json template. Deployed a testing instance with the ScaleUpSchedule/ScaleDownSchedule defined: was surprised to come in, this morning, to find that, even though the overall deployed stack's DesiredCapacity was 1, I was seeing two instances in the EC2 console. Dug through the code and found:

"ScaleUpScheduledAction": {
  "Condition": "UseScheduledAction",
  "Properties": {
    "AutoScalingGroupName": { "Ref": "GitLabASG" },
    "DesiredCapacity": { "Ref": "MaxCapacity" },
    "Recurrence": { "Ref": "ScaleUpSchedule" }
  },
  "Type": "AWS::AutoScaling::ScheduledAction"
}

It seems like it would be better if the ScaleUpScheduledAction block's:

    "DesiredCapacity": { "Ref": "MaxCapacity" },

were

    "DesiredCapacity": { "Ref": "DesiredCapacity" },

Granted, as an upstream project, Watchmaker likely makes different assumptions and I'm free to alter things to fit my project's particular needs but felt it was worth a discussion โ€” thus I'm marking this a question rather than bug.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.