github.com/jlmucb/cloudproxy@v0.0.0-20170830161738-b5aa0b619bc4/go/apps/demo/README.md (about)

     1  Linux Process Demo
     2  ------------------
     3  
     4  The Linux-process version of the demo requires `demo_server` and `demo_client`
     5  to have been built, e.g., by
     6  
     7  	go install github.com/jlmucb/cloudproxy/...
     8  
     9  The following steps set up a Linux-process-based `linux_host` and run the demo
    10  server and client on it. These commands assume that the cloudproxy binaries are
    11  in $GOPATH and that $GOPATH is in $PATH.
    12  
    13  	linux_host &
    14  	export DIR=/tmp/linux_host<something output by linux_host>
    15  	tao_launch -sock ${DIR}/linux_tao_host/admin_socket -- <path/to/demo_server> -config ${DIR}/tao.config
    16  	tao_launch -sock ${DIR}/linux_tao_host/admin_socket -- <path/to/demo_client> -config ${DIR}/tao.config
    17  
    18  Linux Docker Demo
    19  -----------------
    20  The first step in setting up the demo application under Docker is building the
    21  Docker containers for the demo.
    22  
    23  First, build `demo_server` and `demo_client` as standalone binaries as follows.
    24  
    25  	CGO_ENABLED=0 go install -a -ldflags '-s' github.com/jlmucb/cloudproxy/...
    26  
    27  To build `demo_server.img.tgz` and `demo_client.img.tgz`, execute the following
    28  commands.
    29  
    30  	cd <some empty directory>
    31  	cp ${DEMO_DIR}/demo_server/Dockerfile .
    32  	mkdir bin
    33  	cp ${GOPATH}/bin/demo_server bin/demo_server
    34  	mkdir policy_keys
    35  	cp <path/to/policy/cert> policy_keys/cert
    36  
    37  	echo >tao.config <<EOF
    38  	# Tao Domain Configuration file
    39  
    40  	[Domain]
    41  	Name = testing
    42  	PolicyKeysPath = policy_keys
    43  	GuardType = AllowAll
    44  
    45  	[X509Details]
    46  	CommonName = testing	
    47  	EOF
    48  
    49  	touch rules
    50  	tar -czf ${DEMO_DIR}/demo_server/demo_server.img.tgz *	
    51  
    52  To run this demo under the tao, perform the following steps. Note that you can
    53  get the name of the container from the output of `docker ps` after starting the
    54  demo server.
    55  
    56  	linux_host --factory_type docker &
    57  	export DIR=<location of linux_host tmp dir>
    58  	export DEMO_DIR=<the demo directory>
    59  	cd $DIR
    60  	tao_launch -docker_img ${DEMO_DIR}/demo_server/demo_server.img.tgz -- ${DEMO_DIR}/demo_server/demo_server.img.tgz
    61  	tao_launch -docker_img ${DEMO_DIR}/demo_client/demo_client.img.tgz -- ${DEMO_DIR}/demo_client/demo_client.img.tgz --link <name of container>:server
    62