CryptoCoinsInfoClub.com

Docker-compose Ethereum

Local Environment For Ethereum Smart Contracts Development Using Docker

Local Environment For Ethereum Smart Contracts Development Using Docker

Local environment for Ethereum Smart Contracts development using Docker Notlong time ago I had a chance to attend series of events about blockchain. Quickly I became interested in the technical side of the trendy idea. After building simple Bitcoin wallet I decided to try something more advanced. In this article I will share a toolset for building, deploying and testing locally your Ethereum Smart Contracts using Docker. First of all there are several options you should consider before start. To test stuff on Ethereum blockchain you could use the next tools Truffle and Ganache - your personal local Ethereum like blockchain and full toolset for smart contracts. Best for quick start. Setup your own local copy of Ethereum. Closest to real world. As for me I've chosen the last one, because I wanted to be close to real world Ethereum Blockchain and still have the possibility to configure all tools myself to get additional knowledge about how it works. Quickly I understood that I need to setup several Ethereum nodes locally and some tool to make sure they are functioning properly. When it comes to trying new software on my machine I prefer Docker. Nothing makes me so happy than running dozens of services without any knowledge how to setup them :D Quick search gave me the result I wanted: already existing Docker Compose based Ethereum solution , which allows to bring up as many Ethereum nodes as you wish, has predefined test users with some ETH on the balance and Netstat to monitor the nodes. Let's take a look at docker-compose.yml file for the project (I skipped volumes and some other stuff) Bootstrap container acts as the node you can use for RPC and setups initial users. To make it close to real world there is second node called eth, which participates in validating transa Continue reading >>

Building An Ethereum Playground With Docker (part 2dockerimage)

Building An Ethereum Playground With Docker (part 2dockerimage)

@vertigobr Founder & CTIO, disrupting things for fun. Building an Ethereum playground with Docker (part 2 DockerImage) I have updated this article on December/2017. I no longer create a custom Docker image, because Ethereum official image already brings an all-tools version that includes bootnode and other treats. This is the second article in an ongoing series Building an Ethereum Playground with Docker. The articles already published are: We will cover using the official ethereum/go-ethereum Docker image, playing with Ethereum Wallet, provisioning the ethereum nodes on public clouds and deployment of a sample app. This article uses " ethereum/client-go " Docker image to run several Ethereum nodes locally (and safely). It also assumes you have a Docker engine available to you (and know a bit about it), probably after installing Docker for Mac or Docker for Windows on your notebook. All sources are located in . There is a public official image "docker pull ethereum/client-go" that will serve as the base of this work. We will create scripts with some functionality and configuration options to make it generally useful for our evil machinations. This original public base image is a nice piece of work: you can use it to participate on the main public Ethereum network with a simple command: The starting point is the creation of a "genesis.json" file that defines the genesis block of the blockchain. The "genesis.sh" script does that for you, and it can be edited to provide custom values for some variables Some variables on the top of this script can be modified to define your very own genesis block, the main point being that all containers will mount the same genesis.json file when launched with the helper scripts. Nodes that share the same genesis block and are capable of f Continue reading >>

Installer Un Portefeuille Ethereum Avec Docker-compose

Installer Un Portefeuille Ethereum Avec Docker-compose

Installer un portefeuille Ethereum avec docker-compose Posted 12 December 2017 | by Bruce | in Installer avec Docker Installer un portefeuille Ethereum avec docker-compose Il est fortement recommand de ne jamais laisser ses crypto-monnaies sur les plateformes dchange telles que Poloniex , Bittrex , Bitfinex , Cryptopia Mme si les niveaux de scurit de ces dernires peuvent tre diffrents, le plus plus scuris reste toujours dtre le dtenteur total de son portefeuille, cest dire possder la cl prive de son wallet. Une solution est dinstaller le portefeuille sur son ordinateur et de garder sa cl prive en lieu sr. Aujourdhui je vais expliquer comment installer et utiliser go-ethereum qui est limplmentation officielle en Go du protocole Ethereum dans un conteneur docker. Cette application tlcharge la blockchain Ethereum et permet dtre un nud part entire du rseau soit pour miner soit simplement pour grer son portefeuille. Entrons dans le vif du sujet avec le ficher docker-compose.yml : version: '2'services:go-ethereum: image: ethereum/client-go container_name: 'eth' volumes: - "/srv/eth/datadir:/root/.ethereum" # remplacer /srv/eth/datadir par le chemin ou vous voulez stocker la blockchain ports: - 127.0.0.1:30303:30303 - 127.0.0.1:8545:8545 # Port JSON RPC, optionnel command: geth --syncmode=light console # --syncmode=light est optionnel mais permet de tlcharger la blockchain plus rapidement. Il faut ensuite lancer le conteneur avec la commande docker-compose up [-d] La premire chose faire est de crer un portefeuille. Pour cela : docker exec -it go-ethereum_1 geth account Attention, les commandes suivantes doivent tre excutes dans la console javascript de go-ethereum. docker exec -it go-ethereum_1 geth attach web3.fromWei(eth.getBalance("eth key"), "ether") personal.unlockAccoun Continue reading >>

Using Helm To Deploy Blockchain To Kubernetes

Using Helm To Deploy Blockchain To Kubernetes

Virtual Machine Scale Sets (VMSS) feature of autoscaling based on a variety of metrics, Webjet chose to host their private Ethereum networks on a series of VMSS with each one running Docker containers orchestrated by Docker Compose. A generalized version of Webjets Azure GitHub. However, in Webjets path to moving this to production, some deficiencies in their IaaS-based architecture became apparent. replicas for a container; however, in order to load balance across replicas, management of container-host port mappings is required. At the node-level, as VMSS autoscale feature scales out the entire node, VMSS work optimally against homogeneous workloads. With several different services running on the machine, scaling up/down a VMSS would affect all running services on that machine. Alternatively, the architecture could be separated into several Docker Compose files and thereby several VMSS, but this would require a significant amount of pre-planning to ensure a proper balance of hardware needs and costs. Upgrading services meant SSH-ing into the VMs, running up. Configuration management tools such as SaltStack could be used to automate this process, but the process itself is very custom and has a high potential for error. For the above reasons, the Webjet team decided to leverage Kubernetes through AKS to help automate deployment, scaling, and orchestration of the application. With Kubernetes, Webjet is able to scale up/down certain applications and take advantage of Kubernetes native support for rolling upgrades. After migrating their existing Docker Compose manifests to Kubernetes, we landed on the following architecture: The diagram above shows the architecture of the private Ethereum network when mapped to Kubernetes constructs. The blue represents Kubernetes Deployme Continue reading >>

Docker Private Standalone Ethereum

Docker Private Standalone Ethereum

README docker-compose up -d private standalone Ethereum $ geth --networkid 1234 --nodiscover --maxpeers 0 --datadir /root/.ethereum/privchain --mine --minerthreads 1 --etherbase 0x49d38ba99e0a1712388031345114d9da84110e9f --rpc --rpcaddr '0.0.0.0' --rpcport 8545 --rpccorsdomain '*' --rpcapi='admin,db,debug,eth,miner,net,personal,shh,txpool,web3' --unlock 0 --password /root/.ethereum/privchain/passwd ethereum/go-client ENTRYPOINT ["geth"] docker-compose.yml command etherbase 1 INFO [11-11|19:43:48] Starting peer-to-peer node instance=Geth/v1.7.2-stable/linux-amd64/go1.9.1INFO [11-11|19:43:48] Allocated cache and file handles database=/root/.ethereum/privchain/geth/chaindata cache=128 handles=1024WARN [11-11|19:43:48] Upgrading database to use lookup entriesINFO [11-11|19:43:48] Initialised chain configuration config="{ChainID: 1234 Homestead: 0 DAO: Engine: unknown}"INFO [11-11|19:43:48] Disk storage enabled for ethash caches dir=/root/.ethereum/privchain/geth/ethash count=3INFO [11-11|19:43:48] Disk storage enabled for ethash DAGs dir=/root/.ethash count=2INFO [11-11|19:43:48] Database deduplication successful deduped=0INFO [11-11|19:43:48] Initialising Ethereum protocol versions="[63 62]" network=1234INFO [11-11|19:43:48] Loaded most recent local header number=0 hash=c29d613a3864 td=131072INFO [11-11|19:43:48] Loaded most recent local full block number=0 hash=c29d613a3864 td=131072INFO [11-11|19:43:48] Loaded most recent local fast block number=0 hash=c29d613a3864 td=131072INFO [11-11|19:43:48] Regenerated local transaction journal transactions=0 accounts=0INFO [11-11|19:43:48] Starting P2P networkingINFO [11-11|19:43:48] RLPx listener up self="enode://d81d3f613dd1028919fe846e4fcb021cb193b5e7623205f9153e003a8c19adcd6ac0ed1b44689045058cb7a5bf1af484b55fd6a422839e751885ef Continue reading >>

Docker Parity Ethereum Documentation

Docker Parity Ethereum Documentation

Docker containers for Parity are available via Docker Hub : $ docker search parity/parityNAME DESCRIPTION STARS OFFICIAL AUTOMATEDparity/parity Parity is Ethcore's initial fully-featured... 0parity/rust Rust stable, beta and nightly for GitLab C... 0 [OK]parity/snapcraft Docker image for build snap application (U... 0 [OK]parity/rust-arm RUST for GitLab CI runner (ARM architecture) 0 [OK] To get a list of available versions, use curl and jq: $ curl -sS '| jq '."results"[]["name"]' | sort"nightly""v1.6.8""v1.6.9""v1.6.10""v1.7.0" To run Parity with an interactive pseudo-tty shell, run: Parity can be configured using either the CLI options or a config file . Should the CLI flags and the config file disagree about a setting, the CLI takes precedence. You can list all CLI options by running: For Docker specific options, please refer to the Docker documentation , or run docker --help or docker run --help. To publish Paritys ports to the host machine, use the -p option: $ docker run -ti -p 8180:8180 -p 8545:8545 -p 8546:8546 -p 30303:30303 -p 30303:30303/udp parity/parity:v1.7.0 --ui-interface all --jsonrpc-interface all For example, this will expose the User Interface, the JSONRPC-API, and the listen port to the host. Now you can open Parity UI from the Docker host computer to access the Parity Wallet. To enable external discovery where desired (for example for PoA sealing nodes), specify the external IP by appending the flag --nat extip:133.3.3.37, where 133.3.3.37 is to be replaced by your actual external IP of the host. To pass further operating options to Parity, simply append them to the docker run command: $ docker run -ti parity/parity:v1.7.0 --no-ui --no-dapps --no-discovery In this case, it disables the Wallet, the DApps Server, and discovery. For more complex node Continue reading >>

Building An Ethereum Environment With Docker

Building An Ethereum Environment With Docker

Building an Ethereum Environment with Docker Tasha Blockchain & Crypto / System 4 Comments Docker is a powerful tool for managing containers and run-time environments and, besides its many advantages, Docker can also be handy to keep our development workstation tidy while playing with all kind of cool technologies. In addition, containerisation adds an important security aspect by providing a strong isolation from the hosts affairs. In this writing, we are going to harness the power of Docker to build a first Ethereum work and development environment. The Ethereum Go (language) team builds a Docker image of a geth node as part of their continuous build chain. The C++ team does the same and we can use these images to quickly run an Ethereum node in our local environment. Alternatively, we can script our own images, which brings some advantages as we will see later. Before starting with Ethereum however, we need to make a very quick Docker Basics in 120 Seconds intermezzo. If you know Docker already, just skip this part Docker allows to run operating systems, applications and tools in so called Containers. A Container is an isolated environments that represents a autonoumous host on its own a bit in the same way a Virtual Machine does. Yet, Docker Containers are much lighter. They do not start an entire full-blown operating system for each Container instance. Instead, Docker uses Linux kernel isolation mechanisms to run applications on the top of the hosts operating systems, yet keeping them isolated. In order to start a Container, Docker uses Images. An image is basically theimageof an environment before running it (kind like an installation ISO/disk) and they contain the strict minimum required to run this environment. Images represent the common and stable starting po Continue reading >>

Dockerethereum

Dockerethereum

Ethereum Docker dockergethremixIDE docker macwindowslinux remote: Total 115 (delta 0), reused 0 (delta 0), pack-reused 115 Receiving objects: 100% (115/115), 20.97 KiB | 0 bytes/s, done. ethereum-docker git:(master) docker-compose -f docker-compose-standalone.yml up -d ethereum-docker git:(master) docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 2b87b5a814ce ethereum/client-go "geth --datadir=/r..." Less than a second ago Up 4 seconds 0.0.0.0:8545->8545/tcp, 0.0.0.0:30303->30303/tcp, 8546/tcp, 0.0.0.0:30303->30303/udp ethereumdocker_geth_1 ethereum-docker git:(master) docker exec -it ethereumdocker_geth_1 geth attach ipc://root/.ethereum/devchain/geth.ipc instance: Geth/v1.7.3-unstable/linux-amd64/go1.9.2 at block: 0 (Thu, 01 Jan 1970 00:00:00 UTC) modules: admin:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0 ethereum-docker git:(master) docker-compose up -d CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES a345f0f315d1 ethereumdocker_eth "/root/start.sh --..." Less than a second ago Up 7 seconds 8545-8546/tcp, 30303/tcp, 30303/udp ethereumdocker_eth_1 c852e32758e1 ethereumdocker_bootstrap "/root/start.sh --..." Less than a second ago Up 8 seconds 0.0.0.0:8545->8545/tcp, 0.0.0.0:30303->30303/tcp, 8546/tcp, 0.0.0.0:30303->30303/udp bootstrap aa4712bd960b ethereumdocker_netstats "npm start" Less than a second ago Up 9 seconds 0.0.0.0:3000->3000/tcp netstats 3go-ethnetstats Continue reading >>

Go Ethereum - Can I Run Seperatly Docker And Geth? - Ethereum Stack Exchange

Go Ethereum - Can I Run Seperatly Docker And Geth? - Ethereum Stack Exchange

I run private geth testnet and my program is on docker. Everytime I try to call api I get: no JSON RCP response. Do I must run geth on docker too? Something you could try is a docker-compose with your app and a build-in geth docker image . version: '3'services: geth: image: kunstmaan/ethereum-geth-testnet ports: - "8545:8545" - "30303:30303" stdin_open: true tty: true your_app: build: ./ ports: - "8080:8080" (...) my docker-compose.yml: Agniezhk Jan 30 at 10:23 are you trying to connect to ? Greg Jeanmart Jan 30 at 10:38 yes, localhost:8545 Agniezhk Jan 30 at 11:44 in Dockerfile, do you expose 8545: EXPOSE 8545 Greg Jeanmart Jan 30 at 13:43 I ran into the same problem. I had a web server running in a Docker Container and an Ethereum node (for testnet) running on my machine. It seemed the app in Docker wont be able to connect to the node outside of it. Here is how I solved that issue without having to run Geth node inside my container: Make sure you have --rpc and --rpccorsdomain flags when starting Geth In your Application running inside Docker, make sure to point your web3 provider to your machine correctly for my machine i had to use: "docker.for.mac.localhost". web3 = new Web3(new Web3.providers.HttpProvider(" Continue reading >>

Npm - Express App Not Booting In Docker-compose - Stack Overflow

Npm - Express App Not Booting In Docker-compose - Stack Overflow

Express app not booting in docker-compose I am using this to implement an Ethereum private network with Docker Compose which I want to connect to an Express app. I have connected the two things by running the Ethereum network on Docker and the Express app locally. I now want to launch everything with Docker Compose. To do that I adjusted the docker-compose.yml to version: '2'services: bootstrap: build: monitored-geth-client restart: on-failure container_name: bootstrap hostname: bootstrap links: - netstats entrypoint: /root/start.sh command: '--datadir=~/.ethereum/devchain --nodekeyhex=091bd6067cb4612df85d9c1ff85cc47f259ced4d4cd99816b14f35650f59c322 --rpcapi "db,personal,eth,net,web3" --rpccorsdomain="*" --networkid=456719 --rpc --rpcaddr="0.0.0.0"' volumes: - ./files/password:/root/files/password:ro - ./files/genesis.json:/root/files/genesis.json:ro - ./files/keystore:/root/.ethereum/devchain/keystore:rw - /etc/localtime:/etc/localtime:ro ports: - "30303:30303" - "30303:30303/udp" - "8545:8545" eth: build: monitored-geth-client restart: on-failure links: - bootstrap - netstats entrypoint: /root/start.sh volumes: - ./files/password:/root/files/password:ro - ./files/genesis.json:/root/files/genesis.json:ro - ./files/keystore:/root/.ethereum/devchain/keystore:rw - /etc/localtime:/etc/localtime:ro command: '--datadir=~/.ethereum/devchain --rpccorsdomain="*" --networkid=456719 --rpc --bootnodes="enode://288b97262895b1c7ec61cf314c2e2004407d0a5dc77566877aad1f2a36659c8b6[email protected]XXX:30303"' netstats: build: eth-netstats restart: on-failure container_name: netstats environment: - WS_SECRET=eth-net-stats-secret volumes: - /etc/localtime:/etc/localtime:ro ports: - "3000:3000" web: build: ./app restart: on-failure links: - et Continue reading >>

Exploring The Ethereum Platform: Accounts

Exploring The Ethereum Platform: Accounts

Exploring The Ethereum Platform: Accounts Are you into cryptocurrencies yet? Great, I am not, but after coming across Ethereum a Blockchain app platform I felt incredibly intrigued by the concepts of decentralized applications so I decided, as a developer, to start exploring it. This post is not to be intended as an Ethereum tutorial, but rather as random notes sharing what I learn, as I learn it, the way I learn it, which is basically defining, running and tweaking small tests/proofs as I bump into new concepts. Since a Blockchain is distributed across nodes of a network, and transactions occur between a senders and a receivers addresses, the purpose of my first test is to create a private network with a few nodes, create two accounts on it, bring accounts from network node to another, create transactions to move funds from one account to the other. Why a private network? Because of several reasons like feeling free to mess things up without doing any harm and dealing with things at a very small scale. Make sure that node 1 sees node 2 and node 3 as its peers Make sure that account 2 has received the ether sent by account 1 The network Im going to create consists of three nodes, with one of them being the bootnode the node through which other nodes will join the network and find their peers and two of them connecting to the bootnode. For this test, nodes will be implemented as Docker containers connected each other with Docker Compose. You may want to have a look at the code while reading the remaining part of the post. I will omit here to post each component of the dockerized network you can find the whole test code at my github account but one thing that is worth mentioning is how a Blockchain is started or how the very first block of the chain is defined: the genes Continue reading >>

Github - Capgemini-aie/ethereum-docker: Ethereum Development And Test Single And Multi-node Clusters Using Docker

Github - Capgemini-aie/ethereum-docker: Ethereum Development And Test Single And Multi-node Clusters Using Docker

Ethereum development and test single and multi-node clusters using Docker If nothing happens, download GitHub Desktop and try again. If nothing happens, download GitHub Desktop and try again. If nothing happens, download Xcode and try again. If nothing happens, download the GitHub extension for Visual Studio and try again. Get started creating Ethereum development and test single and multi-node clustersrapidly using Docker. We provide full Ethereum test nodes (using the Ethereum Go client with all APIs enabled by default as well as a monitoring dashboard (for the cluster version) providedvia Netstats . To download and install Docker Toolbox for your environment pleasefollow the Docker Toolbox instructions . After Docker Toolbox has been installed, create a default machine to run Docker against. To run a single test Ethereum node run the following: $ docker-compose -f docker-compose-standalone.yml up -d If using docker-machine you should be able to get to the JSON RPC client by doing: open ip default):8545 Assuming you ran docker-compose against the default machine. 1.2. Ethereum Cluster with netstats monitoring To run an Ethereum Docker cluster run the following: 1 Ethereum container (which connects to the bootstrapped container on launch) 1 Netstats container (with a Web UI to view activity in the cluster) open ip default):3000 Scaling the number of nodes/containers in the cluster You can scale the number of Ethereum nodes by running: This will scale the number of Ethereum nodes upwards (replace 3 with however many nodesyou prefer). These nodes will connect to the P2P network (via the bootstrap node)by default. As part of the bootstrapping process we bootstrap 10 Ethereum accounts for usepre-filled with 20 Ether for use in transactions by default. If you want to chang Continue reading >>

Gregbkr/ethereum-nodes-docker

Gregbkr/ethereum-nodes-docker

Introducing the Tidelift Subscription . Professional-quality security updates and maintenance for the open source projects you depend on. In few commands: (thx to docker compose ;) make a transaction in python (transfert test eth between the nodes) Data stays on host volumes: container nodes can be destroy without lossing the data --> easy version migration Auto unlock wallets when container is starting (please use firewall to protect your prod nodes!) More info: you can find an overview of that setup on my blog: git clone eth && cd eth docker volume create --name eth_gethtestdocker volume create --name eth_paritytest Use already existing account and password (nice so you don't have to load ethtest) cp -r gethtest/* /var/lib/docker/volumes/eth_gethtest/_data/cp -r paritytest/* /var/lib/docker/volumes/eth_paritytest/_data/ docker run --rm -it -v eth_paritytest:/root/.parity ethcore/parity --testnet account newls /var/lib/docker/volumes/eth_paritytest/_data/testnet_keys/ <-- your test wallet is heredocker run --rm -it -v eth_gethtest:/root/.ethereum ethereum/client-go --testnet account newls /var/lib/docker/volumes/eth_gethtest/_data/testnet/keystore/ <-- your test wallet is here docker run -d --name geth0 -v eth_gethtest:/root/.ethereum ethereum/client-go --testnetdocker exec -it geth0 bash -c "geth --testnet --password <(echo -n notsecure) account new"docker stop geth0 && docker rm geth0 echo -n 'notsecure' > /var/lib/docker/volumes/eth_paritytest/_data/testnet_keys/mypass <-- unsure that there is no space or new line in file: don't use nano, it leave a new line!! docker exec eth_paritytest_1 /build/parity/target/release/parity --testnet account listdocker exec eth_gethtest_1 geth --testnet account list Use the python script to check data and to send eth between the tw Continue reading >>

Building A Local Ethereum Network With Docker Andgeth

Building A Local Ethereum Network With Docker Andgeth

Building a local Ethereum network with Docker andGeth The following article describes how I set up a private, local Ethereum blockchain for development purposes. I assume readers to have a basic understanding of blockchains, Ethereum and Docker. If you are not interested in this process but only want a working out-of-the-box solution to host your own private network, feel free to pull the results from my GitHub Repo: I am still learning how to interact with the Ethereum network, how to build Apps and how to write smart contracts. While there are several test networks that can already be used by developers, working with them is not always easy. You need to synchronize the state, you need to participate in mining (or get yourself some Ether from the faucets) and you need a constant internet connection. This makes working on these networks very hard if you are on the road. At first, my plan was to create a Docker image with a single node, which can be contacted with RPC. Due to the great Ethereum documentation, this was achieved in an hour, so I wondered if it was possible to set up a whole network which can be started with a simple docker-compose up command, without the need of any configuration. I tried to find a working solution on GitHub and on Blogs, but most of them required some configuration after the containers were started (creating accounts, adding peers manually,). The process of setting up such a self-contained network was harder than I first expected, but I learned a lot about geth and the Ethereum network while trying to achieve this. When we set up a new network, we need to make sure that the nodes will be able to find each other. Theoretically, the nodes should be able to discover each other, if they are on the same network. As we need our network to be i Continue reading >>

How Does One Setup A Private Network With Ethereum Docker Images?

How Does One Setup A Private Network With Ethereum Docker Images?

How does one setup a private network with ethereum docker images? I'm confused about how to get/access geth that is inside the container. it seems though that this image is designed to work on the public network. do i have to make my own dockerfile? What do I need to include in that dockerfile and how do I access geth? Should geth be installed on the 'host' os/where the image/containers are or can it be solely in the docker container? If you want to create a private network, you need to create your own genesis file (see the "Operating a private network" section of the documentation of the client-go Docker image . If you create that in a folder, and then are on the command line in that folder, running: docker run --name ethereum-node -v ${PWD}:/private-data \ ethereum/client-go init /private-data/genesis.json Then you should be able to bring up the node with the command they give: docker run -d --name ethereum-node -v /Users/alice/ethereum:/root \ -p 8545:8545 -p 30303:30303 \ ethereum/client-go --fast --cache=512 If you want to attach to that running node to get at the Javascript CLI, do: docker exec -it ethereum-node /user/bin/geth attach Geth does not need to be installed on the host OS, it can just reside in the Docker container. If you want to control where the blockchain data gets saved, you can alter the -v commands to point to a different location in the host OS to store the data the container generates. Continue reading >>

More in ethereum