Hyperledger Composer Network Deployment Issue: Card Not Found - hyperledger-composer

Currently working through the Hyperledger Composer Basics tutorial Part 3 using the cli. I was able to successfully install the prerequisites and create a Business Card Network Card, but am stuck at the following step of network deployment.
When I attempt to start the network, I get a "Card Not Found" error.
I am in the correct directory and have looked at the v0.20 documentation (the tutorial is in v0.15) but have been unable to sort this out given that I am fairly new to UNIX and the cli.
My latest attempt at using the correct code:
composer network start -f dist/perishable-network.bna -n perishable-network -A admin -S adminpw -c PeerAdmin#h1fv1 -f networkadmin.card -V v0.20.2
Tried so far:
I have tried exporting the admin card to h1fv12, but this did not resolve the issue.
Tried removing all the docker images and re-launching the network from scratch.
Tried re-downloading the source files.
Tried a number of different combinations for the -v -c and -f to see what would work.
Much appreciated if you have any advice!

Re-execute the command, but correct the PeerAdmin card name.
The default name is "PeerAdmin#hlfv1" and NOT "PeerAdmin#h1fv1"

I think you forgot one command, just follow these instructions:
Go to fabric-tools OR fabric-dev-servers directory
run script file: ./createPeerAdminCard.sh
This will create PeerAdmin card, so now you can access the fabric network by using that card.
Now Run command to start the network.

Related

Installing Laravel in Docker Container

Environment: Windows 11 + Docker Desktop 4.12.0
I've been digging this the entire morning. There doesn't seem to be a way of installing Laravel in a Docker image. You must curl it in your WSL2 distro. Trying the command curl -s https://laravel.build/example-app | bash in a Docker container command-line immediately returns the dreaded Docker is not running error message
Some suggest that I need to turn on my "WSL2 integration" checkbox in Docker Desktop settings, but that didn't help.
So what if I download the official Ubuntu image from Docker Hub, run it as a container. Can I download (curl) Laravel in that container?
And while we are here, how does the Bitnami Laravel image differ from the standard procedure given in Laravel documentation? I like it because I can download it as a normal Docker image and create as many containers as I want, but I'm unsure how this connects or contrasts with the official Laravel method.
If it helps anyone, the curl -s https://laravel.build/example-app | bash command downloads several Docker images including MariaDB, Redis, mailhog etc. and therefore needs Docker to be running on the host machine (which is not available inside a container, that's why you can't run the curl command there). Once downloaded, it creates a new container containing (no puns intended) one container for each of these images. You can also customize the list of images/containers that your Laravel application needs by passing the list of services in the curl command like this: curl -s https://laravel.build/example-app?with=mysql,redis. Thanks #apokryfos for the helpful comment. Once these containers are running, you can use VSCode (together with GIT) to connect to them and do your development work.
Of course, you can still use the old-school method of Laravel development. Just install XAMPP or one of its cousins on your machine and then use composer create-project command from the terminal to create it on your local file system. Then host your database and website on locally running instances of Apache and MariaDB.
I have yet to check out Bitnami Laravel image and how it works.

Using AWS CLI with MobaXterm on Windows

I am a newbie to both AWS and MobaXterm. I am trying to use MobaXterm to manage AWS instances because it comes with bash.
I am following the commands as per https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html.
When I run the following command $ sudo ./aws/install, I get the following error:
Unable to start 'install': There is no application associated with the
given file name extension.
I did run chmod 777 to ensure that I am able to read/write/execute. Please see attached image.
I do know that I can use Windows CLI installer in command line. However, doing SSH to EC2 is a nightmare in Windows with all certificates. With MobaXterm (because of bash), it is very easy. So, my preference is to use MobaXterm instead of Windows command prompt.
Moreover, I don't want to directly install Ubuntu. Hence, I am looking for some guidance here. I'd appreciate any help.
I am hoping that I am not missing any package. Thanks for any help.
In order for AWS cli to run on MobaXterm, you will need to run the following commands in MobaXterm:
MobApt install python2-pip
pip2 install awscli
It will take some time for MobaXterm to complete steps 1 and 2. Also, AWS cli runs super slow in MobaXterm. You are better off using cmd.
This is the site that helped me ran AWS cli on MobaXterm.
https://majornetwork.net/2017/07/installing-aws-cli-on-cygwin/

gCloud SDK failed to install in macOS behind corporate proxy

I am trying to install gcloud SDK while using a coporate network which works behind a proxy (and a VPN sometimes). I get proxy settings automatically using a pac.fcgi file (Automatic Proxy Configuration).
Now when I try to run ./install.sh in the terminal, I am constantly getting the following error
➜ google-cloud-sdk ./install.sh
Welcome to the Google Cloud SDK!
To help improve the quality of this product, we collect anonymized usage data
and anonymized stacktraces when crashes are encountered; additional information
is available at <https://cloud.google.com/sdk/usage-statistics>. You may choose
to opt out of this collection now (by choosing 'N' at the below prompt), or at
any time in the future by running the following command:
gcloud config set disable_usage_reporting true
Do you want to help improve the Google Cloud SDK (Y/n)?
ERROR: (gcloud.components.list) Failed to fetch component listing from server. Check your network settings and try again.
I found this SO question which was having the same issue, but their problem was related to ipv6. I already have ipv6 disabled (I can't even enable it) and I am using ethernet to connect to the network. Thus the answer is not useful to me.
I searched for proxy related info about installation and found this page. It asks for using a non-interactive installer instead and using gcloud command to set the proxy after installation. My problem is that I can't even install gcloud. I have tried with both interactive and non-interactive installers.
Any way I can install gcloud while being behind a corporate proxy.
PS: I am on macOS High Sierra and using zsh shell (already tried bash), in case it matters.
So, the problem was I was unable to set proxy before installation of gcloud. The installation of gcloud basically set the CLI in the path and installs some required components (core, bq, gsutil etc).
So what I did is I added the following lines in my .zshrc
source <PATH to gcloud sdk>/google-cloud-sdk/path.zsh.inc
source <PATH to gcloud sdk>/google-cloud-sdk/completion.zsh.inc
or if you're using bash, add these lines in your .bashrc or .bash_profile
source <PATH to gcloud sdk>/google-cloud-sdk/path.bash.inc
source <PATH to gcloud sdk>/google-cloud-sdk/completion.bash.inc
After that I restarted the terminal (or just run source ~/.zshrc or source ~/.bashrc or source ~/.bash_profile on terminal)
Now I was able to use gcloud commands. I ran gcloud init, set the proxy and then installed the required components using the following command -
gcloud components install core bq gsutil
And I installed gcloud without using the install.sh script.
PS: Run scutil --proxy to know the proxy settings set in your system.
For Windows 10 users who experience this issue. I installed the google SDK from the archived versions page. then used git bash to install using ./google-cloud-sdk/install.sh. then added in environment variable manually to PATH to use commands.

How to restart the Hyperledger Composer Playground locally

I've followed the documentation on how to install the Hyperledger Composer & Playground locally and it works. However, if I reboot my computer and want to restart the Hyperledger Composer playground, I don't see how to do it, other than re-downloading the docker images and starting over from scratch.
How can you restart the playground it as to pick back up where you left off?
If you are using Mac then just follow these steps:
Open terminal
Type this command and press enter: ./composer.sh
That's it. Now Hyperledger composer will locally re-started.
You need to change the docker-compose.yml in order to start where you left off,
otherwise your data will be lost after reboot. See http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html and the section called "A Note on Data Persistence" which provides more detail on this.
After reboot you just need to go to dir fabric-tools:
run ./startFabric.sh
run composer-playground
If you had followed the tutorial, your system would have already downloaded all the required docker images.
docker images
command would show you all the images downloaded.
You need to just go to fabric-dev-servers folder and then start the network using
./teardownFabric.sh
./startFabric.sh
./createPeerAdminCard.sh
Then verify that all dockers are running using command
docker ps
Then you can simply start composer playgroup by
composer-playground
Head to http://localhost:8080

google-assistant-demo command not found

I tried to install the Google Assistant onto my new Raspberry Pi. I watched and followed the instruction online (Google developer). I have done exactly what the instruction says. However, at the end, I typed 'google-assistant-demo' to run it. The console answered: 'command not found'
I tried to find the solution online, but I could not find any suitable solution for this situation.
Can anyone help me?
The online instructions create a virtual python environment to keep the dependencies required by the assistant in a separate location.
Try activating the virtual environment before running this command. Here's how to -
pi#raspberrypi:~ $ source env/bin/activate
(env) pi#raspberrypi:~ $ google-assistant-demo

Resources