===============================
Spotr
===============================
Spotr simplifies launching, snapshotting and destroying AWS spot instances.
It's designed for users wanting to use a spot instance as a development box, and persist the state in between sessions.
Quick Start
-----------
First, install the library from pip or clone this git repository and install locally:
.. code-block:: sh
$ pip install spotr
.. code-block:: sh
$ pip install -e .
python -m build
Next, set up credentials and region (in ``~/.aws/config``):
.. code-block:: ini
[default]
aws_access_key_id = YOUR_KEY
aws_secret_access_key = YOUR_SECRET
region=us-west-1
Then, launch an instance using:
.. code-block:: sh
$ spotr launch --type p2.xlarge --max-bid .30 --ami ami-4bf20033
List your running spotr instances with:
.. code-block:: sh
$ spotr list
When you're done working, you can save the current state (take a snapshot) using:
.. code-block:: sh
$ spotr snapshot
And then to terminate the instance:
.. code-block:: sh
$ spotr destroy
Next time you launch an instance, leave out the `--ami` tag and you'll restore the most recent snapshot taken with spotr.
.. code-block:: sh
$ spotr launch --type p2.xlarge --max-bid .30
You can specify default configurations in ``~/.spotr/config``:
.. code-block:: ini
[config]
max_bid=.30
type=p2.xlarge
ebs_optimized=true
security_group_id=sg-XXXXXXXXXXXXXXX
ami=ami-XXXXXXXXXXXXXXXX
us-west-2a_subnet_id=subnet-XXXXXXXX
us-west-2b_subnet_id=subnet-XXXXXXXX
us-west-2c_subnet_id=subnet-XXXXXXXX
us-west-2d_subnet_id=subnet-XXXXXXXX
iam_instance_profile_arn=arn:aws:iam::XXXXXXXX:instance-profile/instance-profile-role
hosted_zone_id=XXXXXXXXXXX
record_name=subdomain.example.com
user_data=#cloud-config
runcmd:
- [ sh, -c, "/bin/bash /opt/dosomethinguseful.sh" ]
Raw data
{
"_id": null,
"home_page": "https://github.com/samuelreh/spotr",
"name": "spotr",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "cli",
"author": "Samuel Reh",
"author_email": "samuelreh@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/ee/2a/eb013130b16c83bb6248cfeb57d9737613cb64bfb9955917d49f62e7d0da/spotr-0.0.16.tar.gz",
"platform": null,
"description": "===============================\nSpotr\n===============================\n\nSpotr simplifies launching, snapshotting and destroying AWS spot instances.\n\nIt's designed for users wanting to use a spot instance as a development box, and persist the state in between sessions.\n\nQuick Start\n-----------\nFirst, install the library from pip or clone this git repository and install locally:\n\n.. code-block:: sh\n\n $ pip install spotr\n\n.. code-block:: sh\n\n $ pip install -e .\n\npython -m build\nNext, set up credentials and region (in ``~/.aws/config``):\n\n.. code-block:: ini\n\n [default]\n aws_access_key_id = YOUR_KEY\n aws_secret_access_key = YOUR_SECRET\n region=us-west-1\n\nThen, launch an instance using:\n\n.. code-block:: sh\n\n $ spotr launch --type p2.xlarge --max-bid .30 --ami ami-4bf20033\n\nList your running spotr instances with:\n\n.. code-block:: sh\n\n $ spotr list\n\nWhen you're done working, you can save the current state (take a snapshot) using:\n\n.. code-block:: sh\n\n $ spotr snapshot\n\nAnd then to terminate the instance:\n\n.. code-block:: sh\n\n $ spotr destroy\n \nNext time you launch an instance, leave out the `--ami` tag and you'll restore the most recent snapshot taken with spotr.\n\n.. code-block:: sh\n\n $ spotr launch --type p2.xlarge --max-bid .30\n\nYou can specify default configurations in ``~/.spotr/config``:\n\n.. code-block:: ini\n\n [config]\n max_bid=.30\n type=p2.xlarge\n ebs_optimized=true\n security_group_id=sg-XXXXXXXXXXXXXXX\n ami=ami-XXXXXXXXXXXXXXXX\n us-west-2a_subnet_id=subnet-XXXXXXXX\n us-west-2b_subnet_id=subnet-XXXXXXXX\n us-west-2c_subnet_id=subnet-XXXXXXXX\n us-west-2d_subnet_id=subnet-XXXXXXXX\n iam_instance_profile_arn=arn:aws:iam::XXXXXXXX:instance-profile/instance-profile-role\n hosted_zone_id=XXXXXXXXXXX\n record_name=subdomain.example.com\n user_data=#cloud-config\n runcmd:\n - [ sh, -c, \"/bin/bash /opt/dosomethinguseful.sh\" ] \n",
"bugtrack_url": null,
"license": "UNLICENSE",
"summary": "",
"version": "0.0.16",
"project_urls": {
"Homepage": "https://github.com/samuelreh/spotr"
},
"split_keywords": [
"cli"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "50db0ebd2ba3033c9f77d0a24cda6aa12d917b42f4df583d78a351ad6829ef48",
"md5": "f11b9778c7d8df10c785d0fe72abb0b9",
"sha256": "a364c24f8350d76d572dd30a250399bd707b77a97c95cb74fd7e8c53a6bafd91"
},
"downloads": -1,
"filename": "spotr-0.0.16-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "f11b9778c7d8df10c785d0fe72abb0b9",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 12157,
"upload_time": "2023-09-01T04:10:59",
"upload_time_iso_8601": "2023-09-01T04:10:59.564636Z",
"url": "https://files.pythonhosted.org/packages/50/db/0ebd2ba3033c9f77d0a24cda6aa12d917b42f4df583d78a351ad6829ef48/spotr-0.0.16-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ee2aeb013130b16c83bb6248cfeb57d9737613cb64bfb9955917d49f62e7d0da",
"md5": "00dccac7a490f142745e801b362bdbfc",
"sha256": "a712b46b72838329c3ae5b13e4e0e20b4ac8d7dd0144ca951cec71531d46ff52"
},
"downloads": -1,
"filename": "spotr-0.0.16.tar.gz",
"has_sig": false,
"md5_digest": "00dccac7a490f142745e801b362bdbfc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 11570,
"upload_time": "2023-09-01T04:11:00",
"upload_time_iso_8601": "2023-09-01T04:11:00.881123Z",
"url": "https://files.pythonhosted.org/packages/ee/2a/eb013130b16c83bb6248cfeb57d9737613cb64bfb9955917d49f62e7d0da/spotr-0.0.16.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-01 04:11:00",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "samuelreh",
"github_project": "spotr",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"tox": true,
"lcname": "spotr"
}