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

in #eos7 years ago

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


Sort:  

This is very exciting. I might try to install it very soon. I don't think I'll have enough EOS to be a block producer when the main net launch I might try anyway.

Thank you for this awesome tool!

What is enough EOS requirement to be a block producer?

I would like to know that too :)

There's none as far as I know but I expect the competition to be fierce to the point of being almost impossible unless someone as super huge amount of EOS.

I always like easy code to fool with, I just have to make some time to fool with it- meh, who needs sleep?

Hah, I stayed up until 1:30am just to get this docker image working, and the post out :P

Wow, thanks a lot for the instructions and update on EOS! This is awesome and so powerful for us all! Upvoted and resteemed too!

Namaste :)

I have NO IDEA what any of the above means. I think its good? All i know is the EOS I bought at $.50 is now over $4 and that its just getting started! Woop Woop!

Phil.jpg

Good buy!

Yeah I watched it from the launch. It started strong and then dipped and at $.50 I scooped some up. It looks better every day. Think its gonna be a longterm winner.

Good catch, I'm still not sure where to buy... Where did you buy it?

I use the Exodus wallet. It has shapeshift built in so I can transfer any alts or BTC.

@someguy123 you made this installer real easy. I've been going back and forth checking the installation for EOS preparing to be an early block producers.

Thank you sir.
@yehey

Too bad we can't be producers :(

I'm still not sure why they never bothered to publish their docker image. It took me 5-10 minutes max.

We'll find out soon, maybe early this week we can test to eosd. Just picked this conversion at telegram chat minutes ago.

soon.

But they told me to think outside the box. :-p

It is good to hear that eos has progressed this far.
Trial under fire is the best way to beat the bugs out of the system.

Great info! Thank you!

@someguy123 I am really interested in learning how to do this stuff. I have just one question do i need to have a server? I was planning to run it off virtualbox just to test it would be that okay? and what are the minimum requirements so that I can set the proper settings for my Virtual Machine. Sorry if those are silly questions I am just learning along the way :)

You can start using a virtual box, it only need 2GB RAM and maybe 10GB hard disk space there nothing in it.
Try it out and you will find out.

Yes I am trying to run it now. Thanks for the help :)

Funny, I was just wondering about having the right HW for EOS and setting up a box!

Wow, great news for eos holders! And also good work with the installer.