Over a million developers have joined DZone.

There's a Bot on Twitter That Sells OpenStack Instances for Bitcoin

DZone's Guide to

There's a Bot on Twitter That Sells OpenStack Instances for Bitcoin

· Cloud Zone
Free Resource

MongoDB Atlas is a database as a service that makes it easy to deploy, manage, and scale MongoDB. So you can focus on innovation, not operations. Brought to you in partnership with MongoDB.

A developer over at StackMonkey wrote a bot that sells instances of his OpenStack cluster for Bitcoin, and the Twitter user @obitcoin is using it on Twitter. Truly we live in a frightening but awfully convenient digital age, made more convenient by devs like Kord Campbell, the developer in question. About the interesting use case the bot has become, Kord said that it was "the most ridiculous thing [he's] ever written for a marketing ploy." I'll say it is.

Kord jumps into a tutorial that shows you how to get started buying and setting up an instance of the OpenStack cluster. The first thing you need is a JSON template that's used for booting the instance. He provides an example of the modified JSON that StackMonkey utilizes for instance callbacks:

  "instance": {
    "dynamic_image_url": "http://download.fedoraproject.org/pub/fedora/linux/updates/20/Images/x86_64/Fedora-x86_64-20-20140407-sda.qcow2",
    "ssh_key": [
      "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAscVmmQi5zYCETV8o1OBO8clqszLiYqg4odrrOJQujm9Ez/c9A8k8i/d0DQJ77FLmBo7zC3BMDGhScZbE41KTMT7Qt6ap55F6YSbkbOXEPteORSWoVxjZDp/1mraCT6hYjeQI6yGIlHXpDfgOWU3xRG1Tp2PTXYQnfnx7L5Xr5BOmkWwXS+7ghBpmCzx1cn6/wNlXzu3ZTGW0wQqwpJBfRprpPvSkBqjpQ14wKsdSZv3AXzmO/lxRlCJUH8vLTJsa8jNAvIBtnRhR+Uei+VfKNHQ9ZYfI+F/pKm66JBlKwOflWIuf0mX3eg1ypZeejB4Ld2SQJS9t0cb8LN/rv24WBQ== kord@superman.local"
    "post_creation": [
      "hostname: stackmonkey-va",
      "manage_etc_hosts: true",
      " - [ wget, "http://goo.gl/KJH5Sa", -O, /tmp/install.sh ]",
      " - chmod 755 /tmp/install.sh",
      " - /tmp/install.sh"

He includes a few more steps including:

  1. Give the instance a dynamic image URL for the boot image.
  2. Change out the SSH key to your own (all in one string, in one line array).
  3. Save your edits to Pastebin and generate a raw link.
  4. Tweet the following using your own Pastebin link:
    @obitcoin !instance ^http://pastebin.com/raw.php?i=zX5fD6HY
  5. When the bot responds, click the link to receive the Bitcoin address.
  6. Pay an amount of Bitcoin (~.25 cents for a day) to the address.
  7. When the payment is noticed, the instance will begin.
  8. Once the instance starts, you'll get another tweet with the IPv6 address.

However, Kord's blog post is a lot more informative than my brief summary here, so please go check it out if you're interested in his OpenStack-to-home Twitter enterprise.

MongoDB Atlas is the best way to run MongoDB on AWS — highly secure by default, highly available, and fully elastic. Get started free. Brought to you in partnership with MongoDB.


Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}