Should really get around to playing with serverless soon!
https://yos.io/2017/09/03/serverless-authentication-with-jwt/
composer transaction submit --card admin@basic-sample-network -d '{"$class": "org.hyperledger.composer.system.AddAsset", "targetRegistry": "resource:org.hyperledger.composer.system.AssetRegistry#org.example.basic.SampleAsset", "resources": [{"$class": "org.example.basic.SampleAsset", "assetId": "newAsset", "owner": "resource:org.example.basic.SampleParticipant#bob", "value": "101"}]}' |
#!/bin/bash | |
if [ -e /var/run/docker.sock ]; then | |
DOCKER_GID=$(stat -c '%g' /var/run/docker.sock) | |
else | |
exit 0 | |
fi | |
if [ ${DOCKER_GID} ]; then | |
DOCKER_GROUP=$(getent group ${DOCKER_GID} | cut -d: -f1) |
Should really get around to playing with serverless soon!
https://yos.io/2017/09/03/serverless-authentication-with-jwt/
Trying to get starter plan to work using the Composer playgound...
Eventually found this bit of doc which seems like a start: https://console.bluemix.net/docs/services/blockchain/develop_starter.html#deploying-a-business-network
Viewing the raw JSON and creating a business network card in the playground should work
Fail! Going to need to actually follow the very long instructions and use the cli to create a card! (Just give me a button!)
COMPOSER_MODULES=("composer-admin" \ | |
"composer-rest-server" \ | |
"composer-cli" \ | |
"composer-runtime" \ | |
"composer-client" \ | |
"composer-runtime-embedded" \ | |
"composer-common" \ | |
"composer-runtime-hlfv1" \ | |
"composer-connector-embedded" \ | |
"composer-runtime-pouchdb" \ |
# See https://console.bluemix.net/docs/services/ContinuousDelivery/toolchains_custom.html#toolchains_custom_pipeline_yml | |
# ... | |
jobs: | |
- name: Example | |
type: builder | |
artifact_dir: '' | |
build_type: customimage | |
docker_image: 'taylorjm/pipeline-job-composer0.19.5' | |
script: |- | |
#!/bin/bash |
#!/bin/bash | |
function get_deploy_name { | |
uuid="$1" | |
shift | |
old_ifs="$IFS" | |
IFS='_' | |
name="$*" | |
IFS=$old_ifs |
function retry_with_backoff { | |
local attempt=1 | |
local max_attempts=5 | |
local timeout=1 | |
local exitCode=0 | |
while : ; do | |
"$@" | |
exitCode=$? |
version: '2' | |
networks: | |
maven: | |
services: | |
maven: | |
container_name: maven | |
image: nginx | |
ports: |
/* | |
* This gradle init script can be used to publish jars to a repository folder | |
* inside a Fabric contract project. For example, in the `fabric-chaincode-java` project: | |
* | |
* ./gradlew -I ~/chaincode-init.gradle -PchaincodeRepoDir=<chaincode_dir>/repository publishShimJarPublicationToFabricRepository publishProtosJarPublicationToFabricRepository | |
* | |
* Where <chaincode_dir> is the chaincode location containing your contract! | |
* | |
* Fabric contract projects can then use jars from the bundled maven repository | |
* during the Fabric instantiation process by adding the following repository |