Closed lukasz-zimnoch closed 4 years ago
🤔 why vagrant and docker-compose rather than reusing the kube work we've already done with a local kube setup? Are we expecting better performance? taking this to the issue, which I see I missed earlier. Sorry!
We can ignore the CI build here because this branch doesn't contain a CircleCI config.
If possible, we should do something about node-gyp
errors. They are not failing end-to-end test but they are polluting logs and we may skip some important warning/error because we'll get used to ignoring the red ERR!
.
If possible, we should do something about
node-gyp
errors. They are not failing end-to-end test but they are polluting logs and we may skip some important warning/error because we'll get used to ignoring the redERR!
.
I'll try to do something with those errors. However, if I don't manage to resolve them quickly, I'll open a separate issue for them in order to unblock this PR.
and avoid all the problems which occur when doing this manually on local development machines.
Can you please summarize for future-us what those problems are in the PR description?
The problem with node-gyp
is closely coupled with #14. I've found and article about it. We use node 11.15.0
as our main version so an old version of node-gyp
is installed at the beginning. Then, when we switch to node 14.3.0
for e2e tests, such an old version of node-gyp
is probably not fully compatible with the newer node version. I'll add a point about node-gyp
to #14.
Some closing thoughts:
I was able to run the end-to-end test using local deployment and vagrant deployment a couple of times 👍
Pro-tip. If you ever encounter the problem like:
Monitoring Bitcoin for transaction to address bcrt1qfzqd4j9s6dn4458n6fsuyeguzpxw5hzlq4gu74...
Connecting to electrum server...
onError: [[object Object]]
(node:14472) UnhandledPromiseRejectionWarning: Error: failed to connect: [Error: failed to connect to electrum server: [Error: websocket connection closed: code: [1006], reason: [connection failed]]]
at file:///home/vagrant/local-setup/tbtc.js/src/lib/ElectrumClient.js:41:13
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at Client.connect (file:///home/vagrant/local-setup/tbtc.js/src/lib/ElectrumClient.js:40:5)
at Object.withElectrumClient (file:///home/vagrant/local-setup/tbtc.js/src/BitcoinHelpers.js:217:5)
at Object.findOrWaitFor (file:///home/vagrant/local-setup/tbtc.js/src/BitcoinHelpers.js:286:14)
sudo docker ps -a
,sudo systemctl kill bitcoin
, and wait for a moment until it boots again,./local-setup/deployments/local-setup-instance/provisioning/run-bitcoin.sh
,It happened to me that Electrum shut down with no explanation 🤷
Refs #8
Here we introduce some provisioning scripts and Packer & Vagrant configs which can be used to run the
local-setup
repo on a separate virtual machine. This is a better alternative for manual installation on the local development machine because:local-setup
installation and configuration so one can avoid problems caused by tools updatesProvisioning scripts are divided into two directories:
local-setup-environment
: those scripts are responsible to prepare the environment containing all prerequisites needed to installlocal-setup
and run the E2E test scripts. Additionally, this directory contains apackerfile.json
which can be used by Packer to build the environment as a reusable Vagrant box or Docker image (this one has limited functionality)local-setup-instance
: those scripts are responsible to run all auxiliary software and thelocal-setup
installation script itself. Their outcome should be properly configured and ready to worklocal-setup
instance. Additionally, this directory contains aVagrantfile
which can be used by Vagrant to run a provisioned VM automatically.