-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade CCF version 1.0.19 to 4.0.1 for use by PDO TP. #443
Upgrade CCF version 1.0.19 to 4.0.1 for use by PDO TP. #443
Conversation
… in progress. Please see README_CCF_v4.md for usage instructions Signed-off-by: Ubuntu <ccf@prakash-services.ngrbedaihgkeramjr13nhjagoc.bx.internal.cloudapp.net>
ledgers/ccf/README_CCF_v4.md
Outdated
cp service_cert.pem networkcert.pem | ||
cp member0_cert.pem memberccf_cert.pem | ||
cp member0_privk.pem memberccf_privk.pem | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are you putting the keys into the source tree rather than the deployment tree?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please ignore the deployment model used in this PR. This PR's sole purpose is to get you to a quick working ledger for local development. I need to fix deployment and docker to make the PR move beyond draft.
|
||
network_cert = config["start"]["network-cert-file"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will look at the full logic later... but this does not look like the right flow. you've changed the way we are doing things. maybe we should have a config file that we use for our deployment since we are moving away from the cchost.toml file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same answer as above. The final PR will not have this new flow, we will use cchost to start the network and use the configure.py to carry out all member steps. cchost API, config/governance templates all have changed, which I need to understand before I can move away from the "sandbox" model to "deployment model", Thanks.
…th what currently exists for v1.0.19 Signed-off-by: Ubuntu <ccf@prakash-services.ngrbedaihgkeramjr13nhjagoc.bx.internal.cloudapp.net>
03101b8
to
b4a2fea
Compare
In order to get the new CCF to run with the sandbox script several changes needed to be made. Most importantly, the ledger URL must be specified with an IP address, not a domain name. Second, the docker build process is slightly changed to accommodate the lack of a configuration step in the new build process. As part of that update, the dependency on PDO_LEDGER_URL environment variable for configuration is removed and the scripts for configuring the CCF instance now take explicit host/port parameters. As part of the update a lot of old unused code was removed from those scripts. Right now the code assumes that the creation of the ledger keys by the CCF node is a sufficient indicator that the node is ready. Some additional checks are in the generate_ledger_authority script which should be the first called after CCF is started. These checks should be added to the other scripts as well. Signed-off-by: Mic Bowman <[email protected]>
34c897d
to
8965e14
Compare
Added a new function for forcing name/address to an ip address. This is useful since CCF requires ledger URLs and interfaces to be specified as IP addresses. Pushed changes to use the new function into the docker tools and the script to start CCF. Signed-off-by: Mic Bowman <[email protected]>
11e7e45
to
0bda9a3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, just a couple of comments
docker/ccf_base.yaml
Outdated
@@ -30,7 +30,7 @@ services: | |||
network_mode: "host" | |||
volumes: | |||
- ./xfer/:/project/pdo/xfer/ | |||
entrypoint: /project/pdo/tools/start_ccf.sh | |||
# entrypoint: /project/pdo/tools/start_ccf.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove?
docker/tools/run_ccf_tests.sh
Outdated
# # ----------------------------------------------------------------- | ||
# yell configure services for host $PDO_HOSTNAME and ledger $PDO_LEDGER_URL | ||
# # ----------------------------------------------------------------- | ||
# rm -f ${PDO_HOME}/ccf/etc/cchost.toml ${PDO_HOME}/ccf/etc/constitution.js | ||
# try make -C ${PDO_SOURCE_ROOT}/ledgers/ccf keys | ||
# try make -C ${PDO_SOURCE_ROOT}/ledgers/ccf config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove?
docker/tools/start_ccf.sh
Outdated
# if [ "${F_MODE,,}" == "build" ]; then | ||
# yell configure services for host $PDO_HOSTNAME and ledger $PDO_LEDGER_URL | ||
# try make -C ${PDO_SOURCE_ROOT}/ledgers/ccf keys | ||
# try make -C ${PDO_SOURCE_ROOT}/ledgers/ccf config | ||
# elif [ "${F_MODE,,}" == "copy" ]; then | ||
# yell copy the configuration from xfer/ccf/etc and xfer/ccf/keys | ||
# try cp ${XFER_DIR}/ccf/etc/* ${PDO_HOME}/ccf/etc/ | ||
# try cp ${XFER_DIR}/ccf/keys/* ${PDO_LEDGER_KEY_ROOT}/ | ||
# elif [ "${F_MODE,,}" == "skip" ]; then | ||
# yell restart with existing configuration | ||
# else | ||
# die "invalid restart mode; ${F_MODE}" | ||
# fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove?
|
||
sleep 5 | ||
|
||
say configure ccf network : ACK the member, open network, add user | ||
try ${F_SERVICEHOME}/bin/configure_ccf_network.py --logfile __screen__ --loglevel WARNING | ||
while [ ! -f ${PDO_HOME}/ccf/workspace/sandbox_common/service_cert.pem ]; do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The while condition should cover all the ledger keys that are copied later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe though I really don't think so. all this is deciding is when it is reasonable to move to the next step. its not a correctness test. not sure there is any value in adding the extra checks. they are written (more or less) atomically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Super minor nits only.
Fixed spelling issue, removed commented code, and (only functional change) added one more check for port availability before starting the CCF services. Signed-off-by: Mic Bowman <[email protected]>
53bc73b
to
5ca59ff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
Work in progress. Currently supports local deployment of CCF TP on bare metal, and usage with PDO. Tested on Ubuntu 20.04 on an Azure VM. Not tested behind proxy.
Please see ledgers/ccf/README_CCF_v4.md for usage instructions.