Skip to content

pablonaranjo/database-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

database-api

API to create, list and delete etcd database instances running in AWS. It uses default VPC/Subnet/SecurityGroup

before to run:

  • create .aws/credentials file inside the repo with access and secret keys

to run the api:

  • docker build -t db-api .
  • docker run -ti -p 8080:8080 -e "TOKEN1={token-id}" db-api

to get databases:

to create database:

  • curl -X POST -H "X-AUTH: {token-id}" --header "Content-Type: application/json" localhost:8080/databases -d '{"name": "database1", "plan": "t2.micro"}'

to delete database:

to test etcd after create database:

  • open port 2379 in security group from source required
  • etcdctl --endpoints http://{public_instance_ip}:2379 mk {/path/key} {value}
  • etcdctl --endpoints http://{public_instance_ip}:2379 ls

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published