Open akolotov opened 5 years ago
@phahulin @ArseniiPetrovich could you please comment the approach? Thanks!
I think it's a good idea and will simplify things for end-users.
As soon as the new release is tagged, the image produced as part of the latest PR will be re-tagged like poa/tokenbridge-oracle:
.
Who will retag it? As a suggestion - I think could reserve master
branch for releases and configure CI to automatically publish required images for PRs into master.
If we take a look at the oracle deployment playbook, there is a lot more happening besides building and launching the oracle container in the jumpbox
role, like setting up remote logging for example.
So correct me if I'm wrong, would this approach change only the way jumpbox
role works (download oracle image instead of building it), and the end-user would still need to download the repo, install ansible and run the playbook?
@rzadp thanks for the question.
My expectation is that playbooks will be part of deployment
image. The process how playbooks work will be changed as so get needed parameters from the .env
file or some yml
file and pass them to the deployment
container.
So, the end user will:
deployment
image and runs the corresponding container passing the env
to the container or mounting yml
file as the volume.What do you think about this?
@akolotov Oh I see. So the deployment
image would have ansible built in, and the only requirement from the user would be having docker installed. I think it makes sense.
The deployment process was changed to use pre-built docker images by #280. The discussion to change CircleCI build process as so the docker image will be built appeared there: https://github.com/poanetwork/tokenbridge/pull/280#discussion_r374213267.
It makes sense to think of an approach when an end user will pull a docker image with a bridge component instead of cloning entire git repository. In this case we could have four images on the docker hub:
The CI process could produce arbitrary images, e.g.
poa/tokenbridge-oracle:<branch-name>
orpoa/tokenbridge-oracle:<commit-hash>
. As soon as the new release is tagged, the image produced as part of the latest PR will be re-tagged likepoa/tokenbridge-oracle:<release-tag>
.This approach should reduce deployment complexity since the number of dependencies is reduced too (e.g. you don't need to install
git
,python
andansible
in order to deploy the oracle on a remote system). It also will make e2e testing for deployment component possible since will reduce nesting number of docker-in-docker beddings.