Giter VIP home page Giter VIP logo

touchdown's Introduction

Yaybu

image

image

image

Yaybu is a push based configuration management tool written in Python with the goal of helping you tame your servers. You describe your infrastructure in a simple and flexible YAML-like language and Yaybu works out what needs to happen to deploy your updates.

All the documentation is available on http://docs.yaybu.com.

Yaybu is very new software, please subscribe to the yaybu-dev mailing list and let us know if you are using it, we'd love to hear from you. You can find the mailing list at http://lists.yaybu.com.

You can also find us in #yaybu on irc.oftc.net.

touchdown's People

Contributors

dibell avatar jc2k avatar mitchellrj avatar plumdog avatar requires avatar shtev avatar winjer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

touchdown's Issues

TerminateInstanceInAutoScalingGroup: Swallow case where instance was already terminated

If TerminateInstanceInAutoScalingGroup is called and an instance was already deleted the error is:

ClientError: An error occurred (ValidationError) when calling the TerminatedInstanceInAutoScalingGroup operation: Instance Id not found - No managed instance found for instance ID .*

Capture it and ignore it (perhaps log it was already terminated) - it means we don't need to do anything.

If an IAM certificate is expired but still in use touchdown will try to delete it but it will fail

delete_server_certificate does not support dry run so we can't detect this ahead of time.

If the graph querying API was rich enough we could find all elb's and cloudfront distributions in the current configuration and ensure they didn't use the cert (we depend on then, so we know their 'describe' service will have a plan.object['ServerCertificateId'] or similar already populated by the time we run).

The alternative is to query for elb and cloudfront distributions that use the cert. For cloudfront that is not so bad, but for elb we'd technically have to do it in every region!!!

Alternatively we can try to delete stale things, but make it a soft-fail as we know its not a crucial part of the deployment.

Update docs

In particular ensure there is an add_foo example for each resource.

Alarms and autoscaling policies are only added (not modified or deleted)

ClouldWatch alarms and associated autoscaling policies are added happily. Changes to their config, however, are not reflected in future updates. They need to be manually deleted before the new config is applied.

Is this by design? Is there an underlying reason why touchdown doesn't maintain consistency as it does with other components?

Handle `BucketNotEmpty` better

Traceback (most recent call last):
  File "/app/bin/tenops", line 9, in <module>
    load_entry_point('ten-self-service==2.16.4.dev0', 'console_scripts', 'tenops')()
  File "/app/src/ten_self_service/scripts/tenops.py", line 7, in main
    Console()()
  File "/app/src/ten_self_service/ops/console.py", line 231, in __call__
    return self.args.func(self.args)
  File "/app/local/lib/python2.7/site-packages/touchdown/core/main.py", line 55, in __call__
    return g.execute(*args, **kwargs)
  File "/app/local/lib/python2.7/site-packages/touchdown/goals/action.py", line 72, in execute
    self.apply_resources()
  File "/app/local/lib/python2.7/site-packages/touchdown/goals/action.py", line 57, in apply_resources
    for status in self.Map(self.ui, dep_map, self.apply_resource):
  File "/app/local/lib/python2.7/site-packages/touchdown/core/map.py", line 172, in __iter__
    raise caught_error
botocore.exceptions.ClientError: An error occurred (BucketNotEmpty) when calling the DeleteBucket operation: The bucket you tried to delete is not empty

This is typically an issue when dealing with e.g. cloudfront logs which continue to arrive even after a cloudfront distribution has been deleted.

Recover from interrupted destroy better

An error occurred (ValidationError) when calling the UpdateAutoScalingGroup operation: The AutoScaling group may not be modified while it is pending delete

SSHException: No existing session

Exception when connecting to server with SSH:

paramiko.ssh_exception.SSHException: No existing session

Turned out to be wrong key and low number of allowed attempts.

Cloud trail creation can fail

botocore.exceptions.ClientError: An error occurred (InvalidCloudWatchLogsLogGroupArnException) when calling the CreateTrail operation: Access denied. Check the permissions for your role.

This needs wrapping in a retry action that retries on InvalidCloudWatchLogsLogGroupArnException.

Bucket policy always updated even when policy not changed

self.get_bucket_policy()['Statement'][0]['Principal']['AWS'] in the S3 bucket code is a random order, so not cannot reliably compare to the local definition of the policy.

For now will need to massage policy comparison so principals are sets.

Long term, policies need to be fully fledged resources.

(Used to work - is this a change to the API? Check releases notes etc)

Support abstract resources

The idea here is that you can declare an interface. Something like singlevaluedispatch in python3.4.

An example might be Route53. The interface might be PublicNetworkInterface and a Route53 record might have:

class Record(Resource):
    name = argument.String()
    value = argument.Resource(PublicNetworkInterface)

A hypothetical Heroku backend might define an Application resource that implements this interface:

@PublicNetworkInterface.register
class Application(Resource):
    name = argument.String()
    ....

And then your HostedZone in a Touchdownfile can:

my_heroku_app = workspace.add_heroku_app(...)

aws.add_hosted_zone(
    name='example.com',
    records=[
        {"name": "www", "type": "CNAME", "value": my_heroku_app},
    ],
)

Initial use cases for this are::

  • A network interface type should expose the IP or domain name of a service (ec2 instance, database, cache, load balancer).
  • An AliasTarget type should provide a HostedCanonicalName and HostedZoneId.
  • A networked service type should expose the IP and port of a service

However this actually works under the hood:

  • Third party components should be able to provide the "interface"
  • Resource dependencies should be tracked
  • It should compliment the type checking done by argument.Resource()

vpc.add_subnet is not idempotent

When re-running the same Touchdownfile that contains the following:

vpc = aws.add_vpc(name='test-vpc', cidr_block='192.168.0.0/22')
subnet1 = vpc.add_subnet(name='subnet1', cidr_block='192.168.0.1/24')

I receive the error:

ClientError: An error occurred (InvalidSubnet.Conflict) when calling the CreateSubnet operation: The CIDR '192.168.0.1/24' conflicts with another subnet

VPC API's are prone to eventual consistency issues

For example:

botocore.exceptions.ClientError: An error occurred (InvalidRouteTableID.NotFound) when calling the CreateTags operation: The routeTable ID 'rtb-ddd98eb9' does not exist

And also 'Object creation failed'. Just needs more retrying.

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.