GithubHelp home page GithubHelp logo

bifrost-k8s-demo's Introduction

Bifrost demo for minikube/ Google Kubernets Engine

Bifrost is an application to bridge Ehereum or Bitcoin blockchain to Stellar to do an initial coin offiering (ICO) or build an anchor/exchange for these coins.

This project is a collection of kubernetes manifest files to setup a local or GKE kubernetes demo. Please note this is WIP and only for demo purpose. The docker artifacts for bifrost are custom branches, not officially supported and may be outdated already. Please see https://github.com/alpe/community-bifrost for the source code.

More about Bifrost can be found in the package docs or the design document

Remeber to use Testnet config only. This is not a valid, persistent nor secure prodction setup.

Components

I use customized branches of:

In this great article you can find everything to setup your token and accounts: Tokens on Stellar

Get started

  1. Prepare accounts in Stellar testnet You may find this Go code helpful for the setup operations: https://gist.github.com/alpe/bb604fb3d11261e3aea7924edfd004ba

  2. Edit bifrost config for account/ token data manifests/bifrost-conf.yaml manifests/bifrost-web-conf.yaml

  3. Deploy everything into your minikube

  4. Forward ports to access locally

 kubectl port-forward bifrost-xxxxxxxxx-yyyyy 8000:8000
 kubectl port-forward bifrost-web-xxxxxxxxx-yyyyy 8080:8080
  1. Access Open bifrost-web in your browser: http://localhost:8080/

  2. Send ETH to the account on the Ropsten testnet

curl -X POST  -H "Content-Type: application/json" -d '{"toWhom":"0x5CB26d92B3aDB284187F9CEe1b2A5F1F804A0719"}' https://ropsten.faucet.b9lab.com/tap
  1. Send it to the address displayed on http://lcoalhost:8080

  2. Transfer some test Ether via https://www.myetherwallet.com/#send-transaction

  3. Watch transactions on the Stellar testnet: http://testnet.steexp.com

  4. Access new account via https://stellarterm.com/#testnet

  5. Check ETH has been received on your bip32 destination child account via https://www.myetherwallet.com/

Resources

Debugging

  • Connect to bifrost database
# Connect to container
kubectl exec -it postgres-xxxxxxx-xxx /bin/sh
# Connect to DB
psql -U myuser -d myDB

Ethereum Ropsten testnet

curl -X POST  -H "Content-Type: application/json" -d '{"toWhom":"0x5CB26d92B3aDB284187F9CEe1b2A5F1F804A0719"}' https://ropsten.faucet.b9lab.com/tap

Troubleshooting

  • Running into out of memory issues

Update resource limits in yaml file and apply again. See: http://kubernetes.io/docs/user-guide/compute-resources/

Geth

  • Geth is not syncing: `Please enable network time synchronisation in system settings. Time in the container is not out ouf sync See kubernetes/minikube#1378 Check current block is increasing:
kubectl port-forward ethereum-geth-xxxxxxxx-yyyyy 8545:8545
curl -X POST localhost:8545 -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}'

Postgresql DB

  • Setup port forwarding
kubectl port-forward bifrost-demo-database  5433:5432
  • Connect to port manually
telnet localhost 5433

Push your own docker image to docker hub

See: https://docs.docker.com/docker-cloud/builds/push-images/

export DOCKER_ID_USER="username"
docker login
docker tag yourbifrost $DOCKER_ID_USER/yourbifrost
docker push $DOCKER_ID_USER/yourbifrost

Support/ Donations

You can find me on

If you find this demo helpful, you can send me some XLM for a coffee to GB7J2ML4P3OCP4JM6ASQ4LK3KQO3F7GLNPOBZCYH4N37DRRWK723W7QM

License

MIT License

Copyright (c) 2018 Alexander Peters

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

bifrost-k8s-demo's People

Contributors

alpe avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

bifrost-k8s-demo's Issues

Kube Deploy

  1. Deploy everything into your minikube

Can you explain this better? Just 'kubectl create -f bifrost-conf.yaml bifrostingress.yaml bifrost-web-conf.yaml [etc]' ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.