Skip to content

Deploying to the testnet

Iuri Matias edited this page Jun 22, 2015 · 5 revisions

To deploy to the testnet, you need to first have account on the testnet with some ether on it.

If you dont have an account already, you can create one already with

geth account new

It will ask you for a password, and will return the account address.

You can then edit config/blockchain.yml and add your address.

for e.g if the address is 0x12345, then:

# config/blockchain.yml
  ...
  staging:
    rpc_host: localhost
    rpc_port: 8101
    rpc_whitelist: "*"
    datadir: default
    network_id: 0
    console: true
    account:
      init: false
      address: 0x12345

The key things are that the networkid be 0 (which is the identifier of the testnet) and the address is set.

Embark will ask you for your password, If you don't want to input the password everytime. You can add it to a file for e.g config/staging_password and then add this to the environment configuration:

# config/blockchain.yml
  ...
  staging:
    rpc_host: localhost
    rpc_port: 8101
    rpc_whitelist: "*"
    datadir: default
    network_id: 0
    console: true
    account:
      init: false
      address: 0x12345
      password: config/staging_password

Afterwards wherever you specify the staging environment in your embark commands, it will use the testnet. e.g

Usual deployment:

embark blockchain staging

embark run staging

Deploy only contracts:

embark deploy staging

Build and Deploy app:

embark build staging

Release to IPFS:

embark ipfs staging

Clone this wiki locally