I have a question about the difference between setting up Hyperledger v1 using getting start method :
http://hyperledger-fabric.readthedocs.io/en/latest/getting_started.html
and the other methods like using vagrant and make peer,
and which method is good and fits for both configuring roles and privacy also for configuring chaincodes.
Thank you,
The getting started has it all contained within. You can bring up an entire Hyperledger Fabric V1.0 network on your local box (or in a hosted cloud environment if you'd like). You can also see how to break it down, to simply bring up a peer, or ordering service, etc, if you don't want the entire fabric.
Vagrant is good for development when you don't want to alter anything on your local box, easy to tear down, and start from scratch. The getting started has it all contained within. You can bring up an entire Hyperledger Fabric V1.0 network on your local box (or in a hosted cloud environment if you'd like). You can also see how to break it down, to simply bring up a peer, or ordering service, etc, if you don't want the entire fabric.
Vagrant is good for development when you don't want to alter anything on your local box, easy to tear down, and start from scratch.
Most would suggest to just use the getting started straight away which uses Docker containers. The only exception might be is if you are running on windows, in which case you might want to use vagrant.
There are 5 independent Hyperledger blockchain technologies. The setup for each one is different.
Hyperledger Fabric--explained above
Hyperledger Sawtooth--explained below
Hyperledger Indy (Identity Managment focus)
Hyperledger Iroha (Mobile app focus)
Hyperledger Burrow (Ethereum EVM implementation)
The last three I will let others explain how to install and setup (since I do not know).
For Hyperledger Sawtooth, here are the instructions for the 1.x release of Sawtooth: https://sawtooth.hyperledger.org/docs/core/releases/latest/app_developers_guide/installing_sawtooth.html
Here's a brief summary of the package installation steps and initial setup:
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8AA7AF1F1091A5FD
$ sudo add-apt-repository 'deb http://repo.sawtooth.me/ubuntu/1.0/stable xenial universe'
$ sudo apt-get update
$ sudo apt-get install -y sawtooth
$ sawtooth keygen
$ sawset genesis
$ sudo -u sawtooth sawadm genesis config-genesis.batch
$ sudo sawadm keygen
Related
Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed last month.
Improve this question
I have a VM instance that contains SQL service, I want to monitor this SQL service how can I do that?
Google provides a Cloud Monitoring agent that can be used in Compute Engine to collect more detailed metrics from the Compute Engine instance itself and third-party applications it might contain, displaying this information at the Cloud Monitoring page. Here's a list of the applications it can gather the metrics from. Here's a guide on how to install the agent.
Assuming you're using an Ubuntu-based distro and the SQL service is MySQL perhaps this guide may be more relevant. In essence what you'd have to do is:
Add the Monitoring agent's package repository:
curl -sSO https://dl.google.com/cloudagents/add-monitoring-agent-repo.sh
sudo bash add-monitoring-agent-repo.sh
sudo apt-get update
Install the Monitoring agent:
sudo apt-get install stackdriver-agent
Start it:
sudo service stackdriver-agent start
Install MySQL monitoring:
sudo apt-get install libmysqlclient20
Download mysql.conf and place it in the directory /opt/stackdriver/collectd/etc/collectd.d/ which is where the Monitoring agent operates on:
(cd /opt/stackdriver/collectd/etc/collectd.d/ && sudo curl -O https://raw.githubusercontent.com/Stackdriver/stackdriver-agent-service-configs/master/etc/collectd.d/mysql.conf)
Edit the configuration file and replace DATABASE_NAME with the
name of the database you want to monitor, and any other variables
that might apply to your database.
Restart the Monitoring agent:
sudo service stackdriver-agent restart
Once that's done, go to the Cloud Monitoring page, select the VM instance as Resource Type: and scroll down until you see Agent Metrics to view the metrics collected by the Monitoring agent.
Optionally you can also install a Cloud Logging agent which will ingest logs from the application. You'd install it with:
curl -sSO https://dl.google.com/cloudagents/add-logging-agent-repo.sh
sudo bash add-logging-agent-repo.sh
sudo apt-get update
sudo apt-get install -y google-fluentd-catch-all-config-structured
sudo service google-fluentd start
Keep in mind a certain pricing is applied to Cloud Logging once you pass a specific threshold of data storage so that's something to keep in mind if you don't want to accidentally incurr costs. Lastly and again, these steps are applicable if you're indeed using an Ubuntu distro and MySQL, if not, check the links and select the options that meet your configuration accordingly.
I have installed Fabric v0.6 on my VM ubuntu 16.04 and it works fine for peer, membersrvc, API, chaincode. I'm doing everything the same with this VM as with another VM on the same server. Let's call them VM1 and VM2. I don't use vagrant or docker.
My project is connecting 4 peers together. I got some advice from different users. Some said that without using vagrant or pulling the image from docker, it will not work. Some said that it works, but my project does not with any VR environment. It's real implementation.
They said that I need to modify some lines in Core.Yaml and membersrvc.yaml to let the peers discover each other and send acknowledgment message. Some said that I have to do the above step and port mapping in different servers to make it work.
When I try to edit both files, Sometime I don't understand about it at all. And some tips has no operation and step.
Thx for helping us to solve the problem.
Hyperledger Fabric has come a long way since the v0.6 release. If you are still working with v0.6 it is highly recommended that you upgrade to the most current release. There are a number of on-going efforts to develop supported approaches to deploying Hyperledger Fabric to multiple nodes, and for v1.0 and beyond, our deployments are all Docker based and can support kubernetes and swarm.
I'm trying to setup Hyperledger Fabric chaincode development setup in my MAC machine. I already have the development environment setup, but my end goal is to just develop a blockchain application on top of Hyperledger Fabric. So I am moving towards the docker chaincode developement and test environment. I'm following the instructions given here (following the Option 2). The docker-compose up command is throwing the following error :
himanshus-mbp:fabric himanshutyagi$ docker-compose up
Recreating fabric_membersrvc_1
Creating fabric_vp_1
ERROR: for vp driver failed programming external connectivity on endpoint fabric_vp_1 (98887f3aa674ed269b3bf9cae87f28d7686920343a9cb2aac5f2715b1a945da8): Error starting userland proxy: write /port/tcp:0.0.0.0:5000:tcp:172.17.0.2:5000/ctl: errno 526
ERROR: Encountered errors while bringing up the project.
There is nothing related to this on the github issues. Can anyone explain what might be going wrong ?
If you know what process is running at port 5000 then try with sudo lsof -i tcp:5000 then note the process id and run sudo kill -15 <PROCESS_ID_HERE>. After that retry running docker commad
The port is probably already in use by another process. Has it already been started or is another program using the port. Use lsof to help find the process.
Using Hyperledger fabric, I run make behave-deps then make behave, yet several of the behave test scenarios fail ("Error starting container: cannot connect to Docker endpoint") - how would I go about fixing this?
Typically this problem is encountered when running outside of Vagrant.
Ensure you can run
docker run hello-world
Without sudo
If this fails, this can be resolved by adding he user to the group as in the installation docs
If running the vagrant-based development environment described here, a change was recently made to the Docker port mapping that would manifest itself with these failed tests. Reconstruct your development environment with vagrant destroy and vagrant up from the $GOPATH/src/github.com/hyperledger/fabric/devenv directory.
Just FYI ... context here is AWS Elastic Beanstalk. I'm trying to the install audiowaveform program on 64bit Amazon Linux 2015.03 v1.4.3 (the customer AMI ID is ami-6b50291c). Running this ... 👇
$ sudo yum install git cmake libmad-devel libsndfile-devel gd-devel boost-devel
... successfully installs all packages except libmad-devel and libsndfile-devel. Below is the relevant output ...
Failed to set locale, defaulting to C
Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main/2015.03 | 2.1 kB 00:00
amzn-updates/2015.03 | 2.3 kB 00:00
Package git-2.1.0-1.38.amzn1.x86_64 already installed and latest version
Package cmake-2.8.12-2.20.amzn1.x86_64 already installed and latest version
No package libmad-devel available.
No package libsndfile-devel available.
Package gd-devel-2.0.35-11.10.amzn1.x86_64 already installed and latest version
Package boost-devel-1.53.0-14.21.amzn1.x86_64 already installed and latest version
Nothing to do
That said, this is not a problem with audiowaveform ... all this means is that the repositories enabled for Amazon Linux AMIs do not have libmad-devel and libsndfile-devel by default. I probably have to simply add my own sources I guess.
Also to note is that no yum packages exist for audio waveform so I have to build this manually.
Obtain the source ... 👇
$ git clone https://github.com/bbcrd/audiowaveform.git
$ cd audio waveform
Then build and install ... 👇
$ mkdir build
$ cd build
$ cmake ..
$ make
$ sudo make install
Question 1
On AWS EB ... the EC2 instances are configured to use Amazon sources which don't have the above packages i.e. libmad-devel and libsndfile-devel. What would be the recommended approach to adding these packages so that they are available to yum?
I stress recommended because I feel that changing the sources from Amazon's could not be the best approach. Nor is adding another source that could conflict with Amazon's packages ... etc etc etc ...
Question 2
Assuming I'm able to install libmad-devel and libsndfile-devel. I still have to build this manually since there are no packages of audiowaveform. On AWS EB I could write a script to do this as each instance is being instantiated ... but I feel this isn't ideal, slow and kinda error-prone. Anyone have advice on how I can do this better?
Probably prepare an AMI with this already built that's based off ami-6b50291c. Thoughts?
Core Objective
I don't have to use audiowaveform ... my objective really is to extract the peak points of some audio (MP3). I will set this up as a separate question.
Amazon Elastic Beanstalk tends to be very restricted in terms of what software you can install on it. I solved it by dockerizing my application environment. This is possible now even on Elastic Beanstalk.
Learn more about Elastic Beanstalk's support for Docker ...
AWS Elastic Beanstalk makes it easy for you to deploy and manage
applications in the AWS cloud. After you upload your application,
Elastic Beanstalk will provision, monitor, and scale capacity (Amazon
EC2 instances), while also load balancing incoming requests across all
of the healthy instances.
Docker automates the deployment of applications in the form of
lightweight, portable, self-sufficient containers that can run in a
variety of environments. Containers can be populated from pre-built
Docker images or from a simple recipe known as a Dockerfile.
Docker’s container-based model is very flexible. You can, for example,
build and test a container locally and then upload it to the AWS Cloud
for deployment and scalability. Docker’s automated deployment model
ensures that the runtime environment for your application is always
properly installed and configured, regardless of where you decide to
host the application.
This way ... you can do whatever you want in the container and that container will run on the kernel provided by the Amazon Linux AMI instance (obviously completely isolated).
I'm also somehow having hard time getting yum to find libsndfile on Amazon Linux AMI (RedHat 7.4). Repositories I've added to yum never seem to contain it. (How to add new repos is described here )
Finally I just downloaded and installed the rpms directly:
wget http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus/x86_64/RPMS.classic//libsndfile-1.0.28-alt1.x86_64.rpm
wget http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus/x86_64/RPMS.classic//libsndfile-devel-1.0.28-alt1.x86_64.rpm
sudo yum localinstall libsndfile-devel-1.0.28-alt1.x86_64.rpm
This way I got PySoundfile working finally.