Orchestrating and monitoring the stellar ecosystem.
Instructions set to be able to deploy to centos7
sudo -s
sudo yum update
sudo yum install -y yum-utils \
device-mapper-persistent-data \
lvm2
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
sudo yum-config-manager --disable docker-ce-edge
sudo yum list docker-ce --showduplicates | sort -r
sudo yum install \
docker-ce-18.06.1.ce-3.el7 \
git \
ntp \
vim \
sudo curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo systemctl start ntpd
sudo systemctl start docker
sudo systemctl enable docker
sudo chkconfig docker on
Installation:
yum install -y gcc-c++ make
curl -sL https://rpm.nodesource.com/setup_11.x | sudo -E bash -
yum install nodejs
node -v
npm -v
Builds the native application using cordova.
$ cd docker/images/builder
$ ./build.sh
$ cd docker/images/builder
$ ./run.sh workspace_path input_project output_project
- workspace_path the parent directory where project to be wrapped is checked out
- input_project the project to be wrapped
- output_project the name of the project to be created as a wrapper
or
$ cd docker/images/builder
./build_fusion.sh
on the same level as quasar, there need to be fusion and shambhala prebuilt
Outside the repository structure, prepare the ecosystem etc subtree (data will be created on start):
$ tree -L 2 stellar-fox/test
stellar-fox/test
├── data
└── etc
├── bridge.cfg
├── cygnus.js
├── deneb.json
├── federation.cfg
└── stellar-core.cfg
Point, where your data partition for stellar-fox will be:
echo "export STELLAR_HOME=$HOME/stellar-fox" >> ~/.bashrc
echo "export HOSTNAME=hostname"
echo "export DOMAIN=${HOSTNAME}.fully.gualified.domain.name"
echo "export FUSION_APP_DOMAIN=fusion-app.fully.gualified.domain.name"
or if diskspace limited:
echo "export STELLAR_HOME=/mnt/sdb1/`whoami`/stellar-fox" >> ~/.bashrc
echo "export HOSTNAME=hostname"
echo "export DOMAIN=${HOSTNAME}.fully.gualified.domain.name"
Gulp is used as a task manager. Launch quasar:
# Clone repo
$ git clone https://github.com/stellar-fox/quasar.git
$ cd quasar
# Install dependencies
$ npm i
# Show the main tasks
$ gulp --tasks-simple
# Run
$ gulp quasar_first_run
Show the chain of subtasks:
# Show tasks as a tree
$ gulp -T
...
[05:08:14] └─┬ quasar_first_run
[05:08:14] └─┬ <series>
[05:08:14] ├─┬ quasar_build
[05:08:14] │ └─┬ <parallel>
[05:08:14] │ ├── cygnus_build
[05:08:14] │ └── deneb_build
[05:08:14] ├─┬ quasar_init
[05:08:14] │ └─┬ <parallel>
[05:08:14] │ ├─┬ influx_init
[05:08:14] │ │ └─┬ <series>
[05:08:14] │ │ ├── influxdb_config_show
[05:08:14] │ │ ├── influxdb_dir
[05:08:14] │ │ ├── influxdb_up
[05:08:14] │ │ ├── influxdb_init
[05:08:14] │ │ └── influxdb_rm
[05:08:14] │ ├─┬ core_init
[05:08:14] │ │ └─┬ <series>
[05:08:14] │ │ ├── core_config_show
[05:08:14] │ │ ├── core_dir
[05:08:14] │ │ ├── core_db_up
[05:08:14] │ │ ├── core_db_init
[05:08:14] │ │ └── core_db_rm
[05:08:14] │ ├─┬ bridge_init
[05:08:14] │ │ └─┬ <series>
[05:08:14] │ │ ├── bridge_config_show
[05:08:14] │ │ ├── bridge_dir
[05:08:14] │ │ ├── bridge_db_up
[05:08:14] │ │ ├── bridge_db_init
[05:08:14] │ │ └── bridge_db_rm
[05:08:14] │ ├─┬ horizon_init
[05:08:14] │ │ └─┬ <series>
[05:08:14] │ │ ├── horizon_config_show
[05:08:14] │ │ ├── horizon_dir
[05:08:14] │ │ ├── horizon_db_up
[05:08:14] │ │ ├── horizon_db_init
[05:08:14] │ │ └── horizon_db_rm
[05:08:14] │ ├── quasar_config_generate_logging_fluentd
[05:08:14] │ ├── quasar_config_generate_policy_restart
[05:08:14] │ └─┬ quasar_dir_prepare
[05:08:14] │ └─┬ <series>
[05:08:14] │ └── quasar_dir_prepare
[05:08:14] └─┬ quasar_up
[05:08:14] └─┬ <series>
[05:08:14] └── quasar_up
Check the status or do the cleanup the docker unit can be used:
[05:08:14] ├── docker_check
[05:08:14] ├── docker_containers_status_running
[05:08:14] ├── docker_containers_status_all
[05:08:14] ├── docker_containers_kill
[05:08:14] ├── docker_containers_remove
[05:08:14] ├── docker_images_remove_dangling
[05:08:14] ├── docker_images_remove_all
[05:08:14] ├── docker_volumes_remove_dangling
[05:08:14] ├── docker_network_prune
[05:08:14] ├── docker_mounts_status
[05:08:14] ├─┬ docker_clean
[05:08:14] │ └─┬ <series>
[05:08:14] │ ├── docker_check
[05:08:14] │ ├── docker_containers_kill
[05:08:14] │ ├── docker_containers_remove
[05:08:14] │ ├── docker_images_remove_dangling
[05:08:14] │ ├── docker_volumes_remove_dangling
[05:08:14] │ └── docker_network_prune
Note, that the cleanup does not remove the persistant data on purpose. You can find the persistant data in ${STELLAR_HOME}/${TARGET}/data.
At the moment the dashboard deployment is not automated yet.
Backup:
$ cd docker/compose
$ curl http://admin:admin@localhost:8081/api/datasources | jq . > ../etc/grafana/datasources/datasources.json
The dumped file represents the array of the datasources. Some manual work to split to single datasources needs to be done as one file is per datasource and [] removed.
Restore:
$ curl -XPOST -i http://admin:admin@localhost:8081/api/datasources --data-binary @../etc/grafana/datasources/influx.json -H "Content-Type: application/json"
where:
- workspace (default: $HOME/stellar-fox)
- target (default: test)
You will be able to access the frontend services as follows:
- Cygnus - Your bank
- pgAdmin 4.0 - The postgres web clinet
- Chronograf - Containers/System monitoring dashboard
- Grafana - Monitoring tool