AWS client operations and creating/tearing down RDS DBs.
AWS client operations and creating/tearing down RDS DBs.
(await-cluster-status target-status db-cluster-identifier)
Blocks until the given cluster status matches the given status. The special status :deleted is used when a DB cluster does not exist. Returns cluster identifier.
Blocks until the given cluster status matches the given status. The special status :deleted is used when a DB cluster does not exist. Returns cluster identifier.
(await-fn f)
(await-fn f opts)
Invokes a function (f) repeatedly. Blocks until (f) returns, rather than throwing. Returns that return value. Catches Exceptions (except for InterruptedException) and retries them automatically. Options:
:retry-interval How long between retries, in ms. Default 1s. :log-interval How long between logging that we're still waiting, in ms. Default `retry-interval. :log-message What should we log to the console while waiting? :timeout How long until giving up and throwing :type :timeout, in ms. Default 60 seconds.
Invokes a function (f) repeatedly. Blocks until (f) returns, rather than throwing. Returns that return value. Catches Exceptions (except for InterruptedException) and retries them automatically. Options: :retry-interval How long between retries, in ms. Default 1s. :log-interval How long between logging that we're still waiting, in ms. Default `retry-interval. :log-message What should we log to the console while waiting? :timeout How long until giving up and throwing :type :timeout, in ms. Default 60 seconds.
(aws-client api)
Constructs a new AWS client for the given API (e.g. :rds) using local AWS credentials if they exist.
Constructs a new AWS client for the given API (e.g. :rds) using local AWS credentials if they exist.
(aws-config-file)
Location of the AWS config file
Location of the AWS config file
(aws-invoke client op)
Like aws/invoke, but throws exceptions on errors. I... I have questions.
Like aws/invoke, but throws exceptions on errors. I... I have questions.
The tag we use to identify our auto-generated resources.
The tag we use to identify our auto-generated resources.
(config)
Loads a configuration map from AWS config file (e.g. (~/.aws/config)
Loads a configuration map from AWS config file (e.g. (~/.aws/config)
(create-postgres! opts)
Creates a Postgres cluster. Options (see https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBCluster.html):
:vpc The VPC to use. Defaults to the first VPC you have. This VPC should have subnets in each AZ.
:security-group-id The id of a security group to assign.
:db-cluster-identifier The name of the cluster. Default 'jepsen-123...', where the numbers are System/currentTimeMillis.
:database-name The database created in the cluster. Default 'jepsen'.
:allocated-storage Storage, in GB. Default 32.
:storage-type The storage type. Default 'gp3'.
:iops Provisioned IO per second for each instance. Default nil.
:db-cluster-instance-class The DB nodes to use. See https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html. Default 'db.m6id.large'.
:db-subnet-group-name The name of the DB subnet to create. Default 'jepsen-db-subnet'.
:engine-version The DB version to use. Default '17.4'.
:master-username The name of the master user for the DB cluster. Default 'jepsen'.
:master-user-password The password for the master user. Default 'jepsenpw'.
:publicly-accessible Whether to make the DB cluster publicly accessible. Default true.
Returns this option map, augmented with additional keys:
:port The port to connect to the cluster
:endpoint The endoint for writers :reader-endpoint The endpoint for readers
Creates a Postgres cluster. Options (see https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBCluster.html): :vpc The VPC to use. Defaults to the first VPC you have. This VPC should have subnets in each AZ. :security-group-id The id of a security group to assign. :db-cluster-identifier The name of the cluster. Default 'jepsen-123...', where the numbers are System/currentTimeMillis. :database-name The database created in the cluster. Default 'jepsen'. :allocated-storage Storage, in GB. Default 32. :storage-type The storage type. Default 'gp3'. :iops Provisioned IO per second for each instance. Default nil. :db-cluster-instance-class The DB nodes to use. See https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html. Default 'db.m6id.large'. :db-subnet-group-name The name of the DB subnet to create. Default 'jepsen-db-subnet'. :engine-version The DB version to use. Default '17.4'. :master-username The name of the master user for the DB cluster. Default 'jepsen'. :master-user-password The password for the master user. Default 'jepsenpw'. :publicly-accessible Whether to make the DB cluster publicly accessible. Default true. Returns this option map, augmented with additional keys: :port The port to connect to the cluster :endpoint The endoint for writers :reader-endpoint The endpoint for readers
(create-public-security-group! vpc)
Creates the public security group for a VPC. Returns the ID of the security group. Does not work.
Creates the public security group for a VPC. Returns the ID of the security group. Does not work.
(create-subnet-group! db-subnet-group-name vpc)
Creates Jepsen's subnet group.
Creates Jepsen's subnet group.
(default-subnet-ids vpc-id)
Lists all default-for-az subnets for a given VPC ID.
Lists all default-for-az subnets for a given VPC ID.
(describe-cluster id)
Describes the cluster with the given ID.
Describes the cluster with the given ID.
(ensure-public-security-group! vpc)
Ensures our public security group exists--one which allows traffic from this node's public IP. Returns the ID of the security group. Does not work.
Ensures our public security group exists--one which allows traffic from this node's public IP. Returns the ID of the security group. Does not work.
(ensure-subnet-group! db-subnet-group-name vpc)
Ensures Jepsen's subnet group exists. Creates it if it doesn't exist. This doesn't check to make sure the subnet group actually reflects the vpc and subnet IDs we might want, but hopefully that's not a big loss.
Ensures Jepsen's subnet group exists. Creates it if it doesn't exist. This doesn't check to make sure the subnet group actually reflects the vpc and subnet IDs we might want, but hopefully that's not a big loss.
(maybe-teardown-subnet-groups!)
Tears down all RDS subnet groups if possible. If DBs are still running, this will fail. Deleting DBs takes fucking ages, so we don't bother being precise here.
Tears down all RDS subnet groups if possible. If DBs are still running, this will fail. Deleting DBs takes fucking ages, so we don't bother being precise here.
The name of a security group that allows access from this machine's public IP.
The name of a security group that allows access from this machine's public IP.
(teardown!)
Tears down all RDS clusters and, if not in use, subnet groups.
Tears down all RDS clusters and, if not in use, subnet groups.
(teardown-clusters!)
Tears down all RDS clusters. Async.
Tears down all RDS clusters. Async.
(vpc-id)
Gets the id of the default VPC to use. We just choose the first.
Gets the id of the default VPC to use. We just choose the first.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close