vulcanlink / charts

Vulcan Link Helm Chart Repo
21 stars 8 forks source link

chart - chainlink #22

Closed ozbillwang closed 3 years ago

ozbillwang commented 3 years ago

Thanks to prepare the helm chart for chainlink, but I met some issues when deploy it.

three issues related to postgresql

  1. postgres not found

So this chart doesn't deploy with a postgresql database, and its name has to be postgres

I installed a postgresql pod in same kubernetes cluster, and adjust DNS name to my-release-postgresql.default.svc.cluster.local in values.yaml

  1. postgresql password.

I have to manually get the postgresql password and update in values.yaml

  1. database chainlink is not exist

I have to manually create a new database chainlink in postgresql container

So finally the DATABASE_URL becomes to

DATABASE_URL: postgresql://postgres:uU45oQ0SFN@my-release-postgresql.default.svc.cluster.local:5432/chainlink?sslmode=disable

But there are new problems:

  1. WALLET_PASSWORD

the password has several limits, such as 3 capital, 3 small letters, number, more than 12 letters, and so on. So finally I use command uuid to generate the uuid as key and adjust several letters to capital.

abcdE5B07E4B-D704-4100-8DEF-BBD369789E19
  1. API_EMAIL

I replace with a fake mailbox.

  1. geth issue
% kk logs -f pod/my-release-0
error starting app: dial tcp: lookup geth on 10.96.0.10:53: no such host

I stuck here, not sure how to fix this issue, need help.

update

anyone can give a full installation instruction? Seems I need install another chart eth-geth

but I got same error

Do i have to install all charts in this repo?

update2

this document gives details, looks promose, will follow up

Since medium is not friendly for free user, I download as pdf and upload here. ;One-click Chainlink deployment. Quickly deploy a Chainlink node using… by Leo Vigna Coinmonks _ Medium.pdf

update3

above url doesn't help a lot, just another way to do helm chart.

I still stuck at the part of geth.

leovigna commented 3 years ago

Thanks for the feedback. I will look to improve instructions to avoid such bugs.

I think you are stuck in the geth deployment. Did you setup a geth node to connect to the Ethereum network? I recommend you simply use an Infura websocket connection until you sync your own node.

ozbillwang commented 3 years ago

i have installed the chart "eth-geth", but still got same error

NAME                          READY   STATUS             RESTARTS   AGE
pod/my-chainlink-0            0/1     CrashLoopBackOff   13         14h
pod/my-geth-0                 1/1     Running            0          14h
pod/my-release-postgresql-0   1/1     Running            0          24h

I check the health of pod my-geth-0, seems it works

INFO [06-26|04:12:10.832] Imported new block headers               count=192  elapsed=24.081ms  number=568569   hash="556136…7628eb" age=5y8mo4d
INFO [06-26|04:12:11.705] Imported new block receipts              count=252  elapsed=32.261ms  number=554893   hash="b323f5…fc610e" age=5y8mo1w   size=196.13KiB
INFO [06-26|04:12:11.744] Imported new block headers               count=192  elapsed=32.642ms  number=568761   hash="a40d80…4f4676" age=5y8mo4d
INFO [06-26|04:12:12.005] Imported new block receipts              count=89   elapsed=16.014ms  number=554982   hash="f47576…4e18b4" age=5y8mo1w   size=76.96KiB
INFO [06-26|04:12:12.331] Imported new block headers               count=192  elapsed=24.841ms  number=568953   hash="7d9364…e4089f" age=5y8mo4d
INFO [06-26|04:12:13.727] Imported new block receipts              count=316  elapsed=110.683ms number=555298   hash="ca159d…134a4f" age=5y8mo1w   size=235.22KiB

I also update the values.yaml

  # Ethereum
  ETH_URL: ws://my-geth-0:8546 #Your Ethereum Node

but still get the error

$ kk logs -f pod/my-chainlink-0
error starting app: dial tcp: lookup geth on 10.96.0.10:53: no such host

update

I adjusted the geth name to my-geth, that is its service name , above problem is gone, now I got another one:

$ kk logs -f pod/my-chainlink-0
error starting app: dial tcp 10.108.229.127:8546: connect: connection refused

10.108.229.127 is service my-geth's IP.

my-geth                          ClusterIP   10.108.229.127   <none>        8545/TCP,8546/TCP,6060/TCP        12m
my-geth-p2p                      NodePort    10.107.128.132   <none>        30303:30303/TCP,30303:30303/UDP   12m

So I check if the port 8546 is listening on chainlink pod or not, it is not

kk port-forward pod/my-chainlink-0 8080:8546
Forwarding from 127.0.0.1:8080 -> 8546
Forwarding from [::1]:8080 -> 8546
Handling connection for 8080
E0626 14:56:37.998108   12820 portforward.go:400] an error occurred forwarding 8080 -> 8546: error forwarding port 8546 to pod be4f429c64196068612797d6196015434acebeb1df42efd69d2438626f265906, uid : exit status 1: 2021/06/26 04:56:38 socat[659461] E connect(16, AF=2 127.0.0.1:8546, 16): Connection refused
Handling connection for 8080
E0626 14:56:39.681215   12820 portforward.go:400] an error occurred forwarding 8080 -> 8546: error forwarding port 8546 to pod be4f429c64196068612797d6196015434acebeb1df42efd69d2438626f265906, uid : exit status 1: 2021/06/26 04:56:39 socat[659525] E connect(16, AF=2 127.0.0.1:8546, 16): Connection refused
ozbillwang commented 3 years ago

Finally I got your point, I don't have to set eth-geth locally and use the online one directly.

  ETH_URL: wss://mainnet.infura.io/ws/v3/262fef5dfe314ef59a5b5c7ff8789xxx  #Your Ethereum Node

Now, it is running. Thanks.

Here are the changes I did

diff --git a/chainlink/values.yaml b/chainlink/values.yaml
index 7c2d787..22bd230 100644
--- a/chainlink/values.yaml
+++ b/chainlink/values.yaml
@@ -12,9 +12,9 @@ config:
   # Login Info
   ROOT: /chainlink
   API_LOGIN: |
-    API_EMAIL
+    example@example.com
     API_LOGIN
-  WALLET_PASSWORD: ""
+  WALLET_PASSWORD: "abcd3029-C7CE-4790-A8E0-93DA1ADC3xxx"
   # HTTP Security
   ALLOW_ORIGINS: "*"
   SECURE_COOKIES: "false"
@@ -22,9 +22,9 @@ config:
   CHAINLINK_TLS_PORT: "0"
   # Database
   DATABASE_TIMEOUT: "0"
-  DATABASE_URL: postgresql://postgres@postgresql:5432/chainlink?sslmode=disable
+  DATABASE_URL: postgresql://postgres:uU45oQ0Sxxx@my-release-postgresql.default.svc.cluster.local:5432/chainlink?sslmode=disable
   # Ethereum
-  ETH_URL: ws://geth:8546 #Your Ethereum Node
+  ETH_URL: wss://mainnet.infura.io/ws/v3/262fef5dfe314ef59a5b5c7ff8789xxx #Your Ethereum Node
   ETH_CHAIN_ID: "1"
   MIN_OUTGOING_CONFIRMATIONS: "2"
   MINIMUM_CONTRACT_PAYMENT: "50000000000000000"
leovigna commented 3 years ago

Be careful! You have just publicly exposed:

I recommend you reset each of these as these could lead to serious security vulnerabilities in the future. Your infura key for example is now good as dead as anyone could spam it with requests. In the future, never expose such parameters in a public forum.

ozbillwang commented 3 years ago

Thanks.

never mind, it is PoC, they are fake secrets and have been masked and will be destroyed soon