profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/whereisaaron/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

whereisaaron/get-aws-profile-bash 50

Fetch AWS keys and secrets from ~/.aws/credentials using a simple bash script

whereisaaron/dehydrated-route53-hook-script 26

Dehydrated hook script that employs cli53 to enable dns-01 challenges with AWS Route 53

whereisaaron/acmesharp-update-certificate 8

Issue/renew and install SSL certificates in IIS using an ACME service like Let's Encrypt

whereisaaron/coreos-kubernetes-generate-certs 5

Script to generate certificates for a kube-aws deployment that last longer than 90 days

whereisaaron/grafana-kubernetes 3

Grafana Docker container suitable for Kubernetes deployment

whereisaaron/fluentd-kubernetes-cloudwatch 2

Fluentd Docker image to send Kuberntes logs to CloudWatch

whereisaaron/acmesharp-script 0

A script to automate the creation of Let's Encrypt SSL certificates using ACMESharp

whereisaaron/autoscaler 0

Autoscaling components for Kubernetes

whereisaaron/awscli 0

AWS CLI container image

whereisaaron/awslogs 0

AWS CloudWatch logs for Humans™

issue commentrestic/restic

Enhancement of restic snapshots --last

I have the same use case, I want to be able to list just the most recent snapshot, but can't find a set of restic snaphots options that can do that. If your host or path varies which each snapshot, you just always get all snapshots listed with --last. And --group-by and --tags can't prevent that.

I am passing a static host name as suggested, but the path is a single file path with a timestamp in it, so '--last' still lists every single snapshot 😄

Even if you only pass one item to --group-by it still groups by every criteria, including those you didn't ask for. So if you have varying host name or paths, there is not way to get --last to just list the most recent snapshot.

If --group-by grouped only by the specified criteria, then it would be easy to e.g. group by just host, or group by just one tag, and get the last snapshot for that backup group.

tribor

comment created time in 20 days

issue commentcloudflare/wrangler

Wrangler npm global install fails when run as 'root'

@magicfredo suggests another workaround that enables using npm. It's not pretty but it works 🎉

npm install @cloudflare/wrangler --global --unsafe-perm=true --allow-root

e.g. Dockerfile:

FROM node:14-bullseye-slim
RUN npm install @cloudflare/wrangler --global --unsafe-perm=true --allow-root

Really the npm installer should at a minimum work with the official node.js container images! But this is a workaround that could be added to docs at: https://developers.cloudflare.com/workers/get-started/guide

https://github.com/cloudflare/wrangler/issues/240#issuecomment-559135179

whereisaaron

comment created time in 21 days

issue openedcloudflare/wrangler

Wrangler npm global install fails when run as 'root'

🐛 Bug report

Describe the bug

If you try to install wrangler following the instructions here:

https://developers.cloudflare.com/workers/get-started/guide

with the command:

npm install -g @cloudflare/wrangler

The wrangler npm global install fails when run as 'root'. This includes the use case of building a docker image. This seems like a regression of the bug reported in #240. Based on that the problem appears to be that wrangler install tries to create /root/.wrangler as 'nobody' instead of 'root'.

The easiest workaround in to install using yarn which doesn't have this problem:

yarn global add @cloudflare/wrangler

Reproduce the bug

Create a minimal Dockerfile with just the npm install and try to build.

Dockerfile

FROM node:14-bullseye-slim
RUN npm install -g @cloudflare/wrangler

Command: docker build .

Error:

[+] Building 8.9s (6/6) FINISHED
 => [internal] load build definition from Dockerfile-foo                                                                                                  0.0s
 => => transferring dockerfile: 114B                                                                                                                      0.0s
 => [internal] load .dockerignore                                                                                                                         0.0s
 => => transferring context: 2B                                                                                                                           0.0s
 => [internal] load metadata for docker.io/library/node:14-bullseye-slim                                                                                  4.0s
 => [auth] library/node:pull token for registry-1.docker.io                                                                                               0.0s
 => CACHED [1/2] FROM docker.io/library/node:14-bullseye-slim@sha256:1b2caf980f422bf707f9dc64879a0a4f9f748d6d3a4e504d8485aa71884c9ec8                     0.0s
 => ERROR [2/2] RUN npm install -g @cloudflare/wrangler                                                                                                   4.7s
------
 > [2/2] RUN npm install -g @cloudflare/wrangler:
#6 4.341 /usr/local/bin/wrangler -> /usr/local/lib/node_modules/@cloudflare/wrangler/run-wrangler.js
#6 4.353
#6 4.353 > @cloudflare/wrangler@1.19.2 postinstall /usr/local/lib/node_modules/@cloudflare/wrangler
#6 4.353 > node ./install-wrangler.js
#6 4.353
#6 4.515 internal/fs/utils.js:314
#6 4.515     throw err;
#6 4.515     ^
#6 4.515
#6 4.515 Error: EACCES: permission denied, mkdir '/root/.wrangler'
#6 4.515     at mkdirSync (fs.js:1009:3)
#6 4.515     at Binary._getInstallDirectory (/usr/local/lib/node_modules/@cloudflare/wrangler/binary-install.js:52:13)
#6 4.515     at Binary.install (/usr/local/lib/node_modules/@cloudflare/wrangler/binary-install.js:78:26)
#6 4.515     at install (/usr/local/lib/node_modules/@cloudflare/wrangler/binary.js:50:10)
#6 4.515     at Object.<anonymous> (/usr/local/lib/node_modules/@cloudflare/wrangler/install-wrangler.js:4:1)
#6 4.515     at Module._compile (internal/modules/cjs/loader.js:1072:14)
#6 4.515     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
#6 4.515     at Module.load (internal/modules/cjs/loader.js:937:32)
#6 4.515     at Function.Module._load (internal/modules/cjs/loader.js:778:12)
#6 4.515     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12) {
#6 4.515   errno: -13,
#6 4.515   syscall: 'mkdir',
#6 4.515   code: 'EACCES',
#6 4.515   path: '/root/.wrangler'
#6 4.515 }
#6 4.585 npm ERR! code ELIFECYCLE
#6 4.585 npm ERR! errno 1
#6 4.589 npm ERR! @cloudflare/wrangler@1.19.2 postinstall: `node ./install-wrangler.js`
#6 4.589 npm ERR! Exit status 1
#6 4.589 npm ERR!
#6 4.589 npm ERR! Failed at the @cloudflare/wrangler@1.19.2 postinstall script.
#6 4.589 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
#6 4.602
#6 4.602 npm ERR! A complete log of this run can be found in:
#6 4.602 npm ERR!     /root/.npm/_logs/2021-09-06T07_01_31_977Z-debug.log
------
executor failed running [/bin/sh -c npm install -g @cloudflare/wrangler]: exit code: 1

Expected behavior

Expected npm to successfully install wrangler.

Environment and versions

Fill out the following information about your environment.

  • operating system: Linux
  • output of wrangler -V: 1.19.2
  • output of node -v: 14.17.6
  • content of wrangler.toml: N/A

created time in 21 days

issue commentcloudflare/wrangler

document using npm with a version manager to avoid permissions errors

This error still occur as at 6 Sep 2021 just trying to install wrangler into the official node container. #848 did not seem to address it. How to recreate:

Dockerfile

FROM node:14-bullseye-slim
RUN npm install -g @cloudflare/wrangler

Command: docker build .

Error:

[+] Building 8.9s (6/6) FINISHED
 => [internal] load build definition from Dockerfile-foo                                                                                                  0.0s
 => => transferring dockerfile: 114B                                                                                                                      0.0s
 => [internal] load .dockerignore                                                                                                                         0.0s
 => => transferring context: 2B                                                                                                                           0.0s
 => [internal] load metadata for docker.io/library/node:14-bullseye-slim                                                                                  4.0s
 => [auth] library/node:pull token for registry-1.docker.io                                                                                               0.0s
 => CACHED [1/2] FROM docker.io/library/node:14-bullseye-slim@sha256:1b2caf980f422bf707f9dc64879a0a4f9f748d6d3a4e504d8485aa71884c9ec8                     0.0s
 => ERROR [2/2] RUN npm install -g @cloudflare/wrangler                                                                                                   4.7s
------
 > [2/2] RUN npm install -g @cloudflare/wrangler:
#6 4.341 /usr/local/bin/wrangler -> /usr/local/lib/node_modules/@cloudflare/wrangler/run-wrangler.js
#6 4.353
#6 4.353 > @cloudflare/wrangler@1.19.2 postinstall /usr/local/lib/node_modules/@cloudflare/wrangler
#6 4.353 > node ./install-wrangler.js
#6 4.353
#6 4.515 internal/fs/utils.js:314
#6 4.515     throw err;
#6 4.515     ^
#6 4.515
#6 4.515 Error: EACCES: permission denied, mkdir '/root/.wrangler'
#6 4.515     at mkdirSync (fs.js:1009:3)
#6 4.515     at Binary._getInstallDirectory (/usr/local/lib/node_modules/@cloudflare/wrangler/binary-install.js:52:13)
#6 4.515     at Binary.install (/usr/local/lib/node_modules/@cloudflare/wrangler/binary-install.js:78:26)
#6 4.515     at install (/usr/local/lib/node_modules/@cloudflare/wrangler/binary.js:50:10)
#6 4.515     at Object.<anonymous> (/usr/local/lib/node_modules/@cloudflare/wrangler/install-wrangler.js:4:1)
#6 4.515     at Module._compile (internal/modules/cjs/loader.js:1072:14)
#6 4.515     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
#6 4.515     at Module.load (internal/modules/cjs/loader.js:937:32)
#6 4.515     at Function.Module._load (internal/modules/cjs/loader.js:778:12)
#6 4.515     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12) {
#6 4.515   errno: -13,
#6 4.515   syscall: 'mkdir',
#6 4.515   code: 'EACCES',
#6 4.515   path: '/root/.wrangler'
#6 4.515 }
#6 4.585 npm ERR! code ELIFECYCLE
#6 4.585 npm ERR! errno 1
#6 4.589 npm ERR! @cloudflare/wrangler@1.19.2 postinstall: `node ./install-wrangler.js`
#6 4.589 npm ERR! Exit status 1
#6 4.589 npm ERR!
#6 4.589 npm ERR! Failed at the @cloudflare/wrangler@1.19.2 postinstall script.
#6 4.589 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
#6 4.602
#6 4.602 npm ERR! A complete log of this run can be found in:
#6 4.602 npm ERR!     /root/.npm/_logs/2021-09-06T07_01_31_977Z-debug.log
------
executor failed running [/bin/sh -c npm install -g @cloudflare/wrangler]: exit code: 1
kentonv

comment created time in 22 days

issue commentcloudflare/wrangler

run-wrangler.js exits 0 if wrangler binary not found

This error still occur as at 6 Sep 2021 just trying to install wrangler into the official node container. How to recreate:

Dockerfile

FROM node:14-bullseye-slim
RUN npm install -g @cloudflare/wrangler

Command: docker build .

Error:

[+] Building 8.9s (6/6) FINISHED
 => [internal] load build definition from Dockerfile-foo                                                                                                  0.0s
 => => transferring dockerfile: 114B                                                                                                                      0.0s
 => [internal] load .dockerignore                                                                                                                         0.0s
 => => transferring context: 2B                                                                                                                           0.0s
 => [internal] load metadata for docker.io/library/node:14-bullseye-slim                                                                                  4.0s
 => [auth] library/node:pull token for registry-1.docker.io                                                                                               0.0s
 => CACHED [1/2] FROM docker.io/library/node:14-bullseye-slim@sha256:1b2caf980f422bf707f9dc64879a0a4f9f748d6d3a4e504d8485aa71884c9ec8                     0.0s
 => ERROR [2/2] RUN npm install -g @cloudflare/wrangler                                                                                                   4.7s
------
 > [2/2] RUN npm install -g @cloudflare/wrangler:
#6 4.341 /usr/local/bin/wrangler -> /usr/local/lib/node_modules/@cloudflare/wrangler/run-wrangler.js
#6 4.353
#6 4.353 > @cloudflare/wrangler@1.19.2 postinstall /usr/local/lib/node_modules/@cloudflare/wrangler
#6 4.353 > node ./install-wrangler.js
#6 4.353
#6 4.515 internal/fs/utils.js:314
#6 4.515     throw err;
#6 4.515     ^
#6 4.515
#6 4.515 Error: EACCES: permission denied, mkdir '/root/.wrangler'
#6 4.515     at mkdirSync (fs.js:1009:3)
#6 4.515     at Binary._getInstallDirectory (/usr/local/lib/node_modules/@cloudflare/wrangler/binary-install.js:52:13)
#6 4.515     at Binary.install (/usr/local/lib/node_modules/@cloudflare/wrangler/binary-install.js:78:26)
#6 4.515     at install (/usr/local/lib/node_modules/@cloudflare/wrangler/binary.js:50:10)
#6 4.515     at Object.<anonymous> (/usr/local/lib/node_modules/@cloudflare/wrangler/install-wrangler.js:4:1)
#6 4.515     at Module._compile (internal/modules/cjs/loader.js:1072:14)
#6 4.515     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
#6 4.515     at Module.load (internal/modules/cjs/loader.js:937:32)
#6 4.515     at Function.Module._load (internal/modules/cjs/loader.js:778:12)
#6 4.515     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12) {
#6 4.515   errno: -13,
#6 4.515   syscall: 'mkdir',
#6 4.515   code: 'EACCES',
#6 4.515   path: '/root/.wrangler'
#6 4.515 }
#6 4.585 npm ERR! code ELIFECYCLE
#6 4.585 npm ERR! errno 1
#6 4.589 npm ERR! @cloudflare/wrangler@1.19.2 postinstall: `node ./install-wrangler.js`
#6 4.589 npm ERR! Exit status 1
#6 4.589 npm ERR!
#6 4.589 npm ERR! Failed at the @cloudflare/wrangler@1.19.2 postinstall script.
#6 4.589 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
#6 4.602
#6 4.602 npm ERR! A complete log of this run can be found in:
#6 4.602 npm ERR!     /root/.npm/_logs/2021-09-06T07_01_31_977Z-debug.log
------
executor failed running [/bin/sh -c npm install -g @cloudflare/wrangler]: exit code: 1
jaredmcdonald

comment created time in 22 days

startedfilipw/dotnet-script

started time in a month

issue commentcloudflare/wrangler

Unable to set secrets on a new environment, which causes publish to fail

This chicken and egg problem bits every time you add a secret to your code then try to set its value with wrangler secret put. It still happens in 1.19.0. On another is someone suggested always referring to secrets as globalThis.SECRET so that it can be undefined during the publish. This seems like a rough edge on the secrets system that's a common part of the new user experience.

signalnerve

comment created time in a month

issue commentcloudflare/wrangler

Secrets added via web UI don't work, wrangler CLI must be used

I was coming here to ask for a CLI interface for non-encrypted vars. One use case is to store a username and password. The username doesn't need to be encrypted, but it is convenient to keep the two values together in the secret vault and install them with the CLI. Currently can do this by making the username needlessly a secret:

wrangler secret put USERNAME
wrangler secret put PASSWORD

This has problems though, as it is not possible to have an empty secret (for some inexplicable reason?). And you can't not define the secret variable either, or wrangler publish will fail (dishonorable mention for using globalThis.USERNAME). But what you want to do in the first place is:

wrangler var put USERNAME
wrangler secret put PASSWORD

And unencrypted values don't have the limitation of not being able to be empty.

jcapogna

comment created time in a month

issue commentcloudflare/wrangler

Pushing a secret for a new worker fails

This chicken/egg design bug is still present in wrangler 1.19.0. You basically have to remove any reference to the secret variable from your code before you can put the initial value of the variable with wrangler. It's a terrible pain while developing, because it bites you every time you add a secret.

EverlastingBugstopper

comment created time in a month

starteddanielroe/stream-vue

started time in 2 months

startedrembik/update-iis-certificate

started time in 3 months