Skip to content
This repository has been archived by the owner on Jan 20, 2021. It is now read-only.

Support tearing down the network #43

Open
ldesrosi opened this issue Nov 15, 2019 · 4 comments
Open

Support tearing down the network #43

ldesrosi opened this issue Nov 15, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@ldesrosi
Copy link
Contributor

It would be good if the scripts could also support the cleanup of the network. Particularly interesting for CI/CD use cases. Ideally for both Docker and IBM Blockchain Platform.

@sstone1 sstone1 added the enhancement New feature or request label Nov 15, 2019
@sstone1
Copy link
Contributor

sstone1 commented Nov 15, 2019

The standard Ansible way for this is to have a state parameter, and perform the right action based on the current state and the desired state (e.g. present, absent, stopped).

@ldesrosi
Copy link
Contributor Author

ldesrosi commented Nov 15, 2019

Correct. However, this has to be added to the playbook and needs to make its way to the tasks.
I am not sure if we can just pass the state down... I suspect we may need new tasks to deal with the deletion.

Something like:

      - &Org2
        msp:
          id: "Org2MSP"
          admin:
            identity: "org2Admin"
            secret: "org2Adminpw"
          ibp:
            display_name: "Org2 MSP"
          state: absent

which results in the deletion of the MSP and all underlying infra? (CA, Peers, etc...)?

@sstone1
Copy link
Contributor

sstone1 commented Nov 15, 2019

@ldesrosi yep, that's what I was thinking of. I think we need the ability to have it fine grained as well, so users can delete individual components if they want to.

sstone1 pushed a commit to sstone1/ansible-role-blockchain-platform-manager that referenced this issue Dec 3, 2019
sstone1 pushed a commit that referenced this issue Dec 3, 2019
Top level state variable (present/absent) for Docker (contributes to #43)
@sstone1
Copy link
Contributor

sstone1 commented Dec 4, 2019

The PR #69 adds a top-level state property that allows a user to teardown the entire network. We need to expand this so that the state property is available on:

  • Individual organizations
  • Individual components (CAs, peers, orderers)

It may not make sense to offer a state on a channel, as these cannot be removed. The same applies for smart contracts, as these cannot be undeployed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants