Giter Club home page Giter Club logo

dreamland_go_cli's Introduction

Dreamland

Release License Go Report Card GoDoc Discord

Dreamland is a local development tool that lets you run a full-fledged Taubyte-based Cloud on your machine. For documentation, visit https://tau.how.

Installation

Binary

Run:

$ curl https://get.tau.link/dream | sh

Source

First, use Go to install dreamland:

$ go install github.com/taubyte/dreamland

Then, you can create a symbolic link or an alias for the dreamland command:

Symbolic link:

$ ln -sv $(dirname $(which dreamland))/dream{land,} 

Alias:

$ echo 'alias dream=dreamland' >> ~/.bashrc
$ source ~/.bashrc

Usage

Dreamland can simulate multiple Taubyte networks, each referred to as a 'universe'. You can start a new universe (default name is "blackhole") with the following command:

$ dream new multiverse 

Once the message [SUCCESS] Universe blackhole started! appears, your local Taubyte instance is ready. You are now running elder, monkey, tns, hoarder, patrick, auth, seer, and substrate nodes locally on your machine.

You can interact with Dreamland using the Web Console. Dreamland can be selected from the network selection dropdown if it's active locally. From here, you can create new projects, import existing ones, trigger builds, and run resources like websites and dFuncs.

Connecting Console to Dreamland

Similarly to when selecting a network on web console (console.taubyte.com), dreamland can be selected from the network selection dropdown If dreamland is active, then a selection option for dreamland will appear in the network selection

Import a project

If your intention is to create a new project, follow the steps that you normally would if you were connected to a production cloud, by clicking Create Project. Note that this will create a new GitHub repo, so it is recommended that you create this as a private repo.

However, if you want to work on an existing project click on Import Project. This will show a menu with two dropdowns, one for your config repository, the other for your inline code repository.

One convenient feature is that once selecting a config repository, if a code repository is found matching the config, it will be selected automatically.

Branches

If importing a project, it is recommended that you make changes to your project on a branch, rather than master/main to not affect production deployments.

If using Web Console Once selecting a project, you may checkout or create a new branch from the top bar.

By default, ci/cd events are triggered by events on the master/main branch. You will need to override this using a fixture setBranch:

$ dream inject set-branch {name-of-branch}

Websites and Libraries

If importing a project that has a library, or website you will need to register the resource on auth, before being able to trigger a build for these resources. This can be achieved on web console by going to the resource and using the fix repo tool.

Running HTTP Resources

HTTP resources run locally on Dreamland. You need to add the domains for these resources to your /etc/hosts file under 127.0.0.1. To access these resources, you also need the port that the substrate node is running on. Once you have the domain and the port, you can access the resource at {domain}:{port}/{path}.

Viewing Port Information

You can view the ports that your local Tau protocols are running on using the status command.

To view a specific protocol's port (e.g., seer, auth, patrick, tns, hoarder, substrate):

$ dream status {protocol-name}

Example:

$ dream status substrate

@ http://127.0.0.1:11429

┌─────────────────────┬────────┬───────┐
│ substrate@blackhole │ http   │ 11429 │
│                     ├────────┼───────┤
│                     │ p2p    │ 11182 │
│                     ├────────┼───────┤
│                     │ copies │     1 │
│                     ├────────┼───────┤
│                     │ dns    │ 11204 │
└─────────────────────┴────────┴───────┘

To view all ports:

$ dream status universe 

Output will look like:

┌───────┬─────────────────────┬────────┬───────┐
│ Nodes │ elder@blackhole     │ p2p    │ 10951 │
│       ├─────────────────────┼────────┼───────┤
│       │ hoarder@blackhole   │ http   │ 10900 │
│       │                     ├────────┼───────┤
│       │                     │ p2p    │ 11042 │
│       │                     ├────────┼───────┤
│       │                     │ copies │     1 │
│       │                     ├────────┼───────┤
│       │                     │ dns    │ 11204 │
│       ├─────────────────────┼────────┼───────┤
│       │ monkey@blackhole    │ p2p    │ 11063 │
│       │                     ├────────┼───────┤
│       │                     │ copies │     1 │
│       │                     ├────────┼───────┤
│       │                     │ dns    │ 11204 │
│       │                     ├────────┼───────┤
│       │                     │ http   │ 10900 │
│       ├─────────────────────┼────────┼───────┤
│       │ tns@blackhole       │ copies │     1 │
│       │                     ├────────┼───────┤
│       │                     │ dns    │ 11204 │
│       │                     ├────────┼───────┤
│       │                     │ http   │ 11366 │
│       │                     ├────────┼───────┤
│       │                     │ p2p    │ 11126 │
│       ├─────────────────────┼────────┼───────┤
│       │ patrick@blackhole   │ copies │     1 │
│       │                     ├────────┼───────┤
│       │                     │ dns    │ 11204 │
│       │                     ├────────┼───────┤
│       │                     │ http   │ 11324 │
│       │                     ├────────┼───────┤
│       │                     │ p2p    │ 11084 │
│       ├─────────────────────┼────────┼───────┤
│       │ auth@blackhole      │ p2p    │ 11021 │
│       │                     ├────────┼───────┤
│       │                     │ copies │     1 │
│       │                     ├────────┼───────┤
│       │                     │ dns    │ 11204 │
│       │                     ├────────┼───────┤
│       │                     │ http   │ 11345 │
│       ├─────────────────────┼────────┼───────┤
│       │ seer@blackhole      │ http   │ 11303 │
│       │                     ├────────┼───────┤
│       │                     │ p2p    │ 11105 │
│       │                     ├────────┼───────┤
│       │                     │ copies │     1 │
│       │                     ├────────┼───────┤
│       │                     │ dns    │ 11204 │
│       ├─────────────────────┼────────┼───────┤
│       │ client@blackhole    │ p2p    │ 10952 │
│       ├─────────────────────┼────────┼───────┤
│       │ substrate@blackhole │ dns    │ 11204 │
│       │                     ├────────┼───────┤
│       │                     │ http   │ 11429 │
│       │                     ├────────┼───────┤
│       │                     │ p2p    │ 11182 │
│       │                     ├────────┼───────┤
│       │                     │ copies │     1 │
└───────┴─────────────────────┴────────┴───────┘

Running Fixtures

Fixtures are used to inject event & data into a universe. The main fixtures you might need are pushAll and attachPlugin.

push-all fixture:

$ dream inject push-all

attach-plugin fixture:

$ dream inject attach-plugin -p {path-to-plugin}

dreamland_go_cli's People

Contributors

sniper365 avatar

Watchers

 avatar  avatar

dreamland_go_cli's Issues

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.