Skip to content
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

Bcf 3281 ability to deploy node using docker compose #13721

Merged

Conversation

Atrax1
Copy link
Contributor

@Atrax1 Atrax1 commented Jun 28, 2024

Ticket : BCF-3281

Requires Dependencies

Resolves Dependencies

@Atrax1 Atrax1 self-assigned this Jun 28, 2024
@Atrax1 Atrax1 force-pushed the BCF-3281-ability-to-deploy-node-using-docker-compose branch from 9cd3490 to abca137 Compare July 2, 2024 10:31
Copy link
Contributor

github-actions bot commented Jul 2, 2024

I see you updated files related to core. Please run pnpm changeset in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

@jmank88 jmank88 requested review from jmank88 and pavel-raykov July 2, 2024 14:38

cld Runs the chainlink node container in dev mode

acceptance Run the services required to perform an acceptance test
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you decide to remove this functionality?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't its just renaming as it was just a docker compose up behind and not running any acceptance test

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, that was a bad naming then.

Copy link
Collaborator

@pavel-raykov pavel-raykov Jul 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please update the README file accordingly then?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I'll be pushing soon the updates on the README, PR is still in draft

@@ -32,8 +30,6 @@ services:
dockerfile: core/chainlink.Dockerfile
entrypoint: /bin/sh -c "chainlink -c /run/secrets/config node start -d -p /run/secrets/node_password -a /run/secrets/apicredentials"
restart: always
environment:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, could you confirm that there is no application that runs "docker-compose -f docker-compose.yaml ..." which assumes that CL_DATABASE_URL is propagated somehow from the upstream?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean if used without the compose script and hence without docker-compose.postgres.yaml ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its not meant to be used without compose script

@Atrax1 Atrax1 marked this pull request as ready for review July 4, 2024 14:08
@Atrax1 Atrax1 requested a review from a team as a code owner July 4, 2024 14:08
The `cld` command will bring up the services that a chainlink node needs to connect to (parity/geth, postgres), and then attach the users terminal to a docker container containing the host's chainlink repository bind-mounted inside the container at `/usr/local/src/chainlink`. What this means is that any changes made within the host's repository will be synchronized to the container, and vice versa for changes made within the container at `/usr/local/src/chainlink`.

This enables a user to make quick changes on either the container or the host, run `cldev` within the attached container, check the new behaviour of the re-built node, and repeat this process until the desired results are achieved.
Will run one node with a postgres database and optionally by default a devnet RPC node that can be either geth or parity.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this "optionally" make sense? (I.e., it just runs one node with postgres db and a devnet RPC [parity by default]).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similar for "./compose up"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure will commit the changes soon 👍


# Requirements

- [docker-compose](https://docs.docker.com/compose/install/)

# Using the compose script

Inside the `chainlink/tools/docker` directory, there is a helper script that is included which should cover all cases of integration / acceptance / development needs acroos multiple services. To see a list of available commands, perform the following:
Inside the `chainlink/tools/docker` directory, there is a helper script that is included
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this still a part of the sentence?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm updating the sentence to be more clear


```sh
cd tools/docker
./compose help
```

## Examples
## Env vars
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please also explain what ".env" file does in this section?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure


# Requirements

- [docker-compose](https://docs.docker.com/compose/install/)

# Using the compose script

Inside the `chainlink/tools/docker` directory, there is a helper script that is included which should cover all cases of integration / acceptance / development needs acroos multiple services. To see a list of available commands, perform the following:
You should use the script `compose` located in the `chainlink/tools/docker` directory
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a dot to separate two sentences?

@pavel-raykov pavel-raykov self-requested a review July 5, 2024 07:57
@cl-sonarqube-production
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@Atrax1 Atrax1 added this pull request to the merge queue Jul 8, 2024
Merged via the queue into develop with commit 4518ceb Jul 8, 2024
115 checks passed
@Atrax1 Atrax1 deleted the BCF-3281-ability-to-deploy-node-using-docker-compose branch July 8, 2024 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants