EOS-In-A-Box - Get started on EOS today!

EOS-In-A-Box - Get started on EOS today!

Today EOS Dawn V2 launched on Testnet. This means people can do some light playing around with EOS, including smart contracts, transfers, and looking up their accounts.

Unfortunately EOS did not publish their Docker images in binary format yet, nevertheless I decided to publish them myself. I also ported Steem-in-a-box over, and adjusted it to work better for EOS.

Unlike Steem-in-a-box, these docker images are built from the official Dockerfile in the EOSIO/eos repo. EOS is more complex to build so I saved time by using their Docker setup which works just fine :)

Step 1. Grab a server!

Choose your favourite server provider. I recommend Privex because they accept STEEM :) (disclaimer: I am the CEO of Privex Inc. - but our services are well loved by the community).

The network is small right now, so even a 2GB VPS is fine. If you plan on starting an EOS witness (producer) when the next testnet or mainnet launches, it's best to grab at least 8 or even 16GB of RAM.

Step 2. Install EOS-in-a-box

EOS-in-a-box handles installing docker, grabbing my image, and starting up the server with the correct ports forwarded and the correct things mounted.

Let's start:

apt update
apt install git curl wget
git clone https://github.com/someguy123/eos-docker.git
cd eos-docker
./run.sh install_docker

This will install Docker. If you are running as "ubuntu" or similar, it's recommended to log out and back in again (close SSH and open it again) to adjust your permissions.

Now let's grab my image and boot up EOS!

./run.sh install

As @dantheman @dan explains, EOS still uses the old shared_memory code from Steem. This means for a real-world witness/producer, you should probably use /dev/shm (a RAM drive). EOS-in-a-box is configured to mount /dev/shm to /shm if you would like to alter your config.ini. When EOS is properly released, EOS-in-a-box will include a configuration that uses /dev/shm by default, with a pre-configured list of seeds for fast deployment.

For testing it doesn't really matter, so let's just start it.

./run.sh start

EOS will now be running, you can confirm it with ./run.sh status or docker ps

ubuntu@chris-eos:~/eos-docker$ ./run.sh status
Container exists?: YES
Container running?: YES
ubuntu@chris-eos:~/eos-docker$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
87f80dd1b318        eos                 "start_eosd.sh"     20 seconds ago      Up 19 seconds                           seed
ubuntu@chris-eos:~/eos-docker$

Finally let's enable the wallet API and restart it.

nano data/config.ini

Add to the bottom of the file

plugin = eosio::wallet_api_plugin

Save and close the file (for nano that's CTRL-X, and type yes to save)

Now let's restart EOS

./run.sh restart

Using the wallet

The wallet is a little bit different to STEEM. Here are some examples of how to use it:

Create a wallet

ubuntu@chris-eos:~/eos-docker$ ./run.sh wallet create -n test
Creating wallet: test
Save password to use in the future to unlock this wallet.
Without password imported keys will not be retrievable.
"PW5KhAdia26ZWmvpPFPX6G3ppCpzPAaumHbmLgaKejtsQ13mNiS8g"

Lock the wallet

ubuntu@chris-eos:~/eos-docker$ ./run.sh wallet lock -n test
Locked: test

Unlock the wallet

ubuntu@chris-eos:~/eos-docker$ ./run.sh wallet unlock -n test
password: Unlocked: test

Import your private key

(yes this is a random private key. no it does not contain any EOS.)

ubuntu@chris-eos:~/eos-docker$ ./run.sh wallet import -n test 5JtrsfV1SaQmuSWV4qpwqHqK2Pk4idvwskumZKWF4DXYJRn9iWE
imported private key for: EOS5GjCUAzNha1dmLVgtY2JxqjHZ9Rb33FMWdEsmUEM6sSd7t7nAG

Using the client

EOS has a "client" as well as a wallet. To make it easy to use, you can use ./run.sh client

Example

ubuntu@chris-eos:~/eos-docker$ ./run.sh client version client
Build version: 9703495c

Query the public testnet

To query the public testnet, you must set your host to testnet1.eos.io - there is currently no safe p2p functionality so you must direct your client to their public server, you cannot connect your local testnet to the public testnet.

Example - Get Block

ubuntu@chris-eos:~/eos-docker$ ./run.sh client -H testnet1.eos.io -p 80 get block 10000
{
  "previous": "0000270f69c1a22dc6463335325b01ac03b25af8891dfc88ac0418f88b62f062",
  "timestamp": "2017-12-04T22:41:46",
  "transaction_merkle_root": "0000000000000000000000000000000000000000000000000000000000000000",
  "producer": "initq",
  "producer_changes": [],
  "producer_signature": "1f77718a0efb56ef43a0adcd10108ec058aa9760b2a3bc59dcae967637a2ac72dc68077d232026de5d929a1d55a4bbd0bc4d040d44dc2380ac4e1107f1a61e170b",
  "cycles": [],
  "id": "00002710ebdfd9569d544ed746bb49d7a93e813190f3b4d138a0874d4da05cdd",
  "block_num": 10000,
  "ref_block_prefix": 3612234909
}

Finding out your username

To find out your username on the public testnet, go to https://eosio.github.io/genesis/tools/account-name/index.html and enter your EOS public key, or your ETH address used to purchase the tokens.

You can then look up your account using the client:

Example

ubuntu@chris-eos:~/eos-docker$ ./run.sh client -H testnet1.eos.io -p 80 get account yourname
{
  "account_name": "yourname",
  "eos_balance": "999570.0000 EOS",
  "staked_balance": "0.0000 EOS",
  "unstaking_balance": "0.0000 EOS",
  "last_unstaking_time": "1969-12-31T23:59:59",
  "permissions": [{
...

Can I set up a witness (producer)?

No. See the previous screenshot in "using the client". You cannot currently run a producer, or even connect your EOSD to the main network.

But it's at least an early proof of concept to play with :)

I believe you can at least write smart contracts, however I have not played with them yet. I may experiment with them over the next few days now that I have it working well.

Discussion

All discussion is held on the EOS telegram. There is a main chat and a developer chat.

You can join the main chat at https://EOS.io/chat - you'll need to ask if you would like to be invited to the developer chat (most likely where witness/producer talk will happen)


GIF Avatar by @stellabelle


Do you like what I'm doing for STEEM/Steemit?

Vote for me to be a witness - every vote counts.

Don't forget to follow me for more like this.


Have you ever thought about being a witness yourself? Join the witness channel. We're happy to guide you! Join in shaping the STEEM economy.

Are you looking for a new server provider? My company @privex offers highly-reliable and affordable dedicated and virtual servers for STEEM, LTC, and BTC! Check out our website at https://www.privex.io


H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now