Hi everyone, I'm attempting to explore fleet on my...
# fleet
j
Hi everyone, I'm attempting to explore fleet on my local MacBook Pro (Intel chipset). macOS 14.1.2, Docker Desktop v4.26.0, I followed the instructions to download NPM. I ran
sudo npm install -g fleetctl
successfully but then running
sudo fleetctl preview
results in:
Copy code
2023/12/08 17:52:26 must use ASL logging (which requires CGO) if running as root
error getting credentials - err: exit status 1, out: ``

Error: Failed to run `docker-compose`
Has anyone run into this issue before?
Not sure if this is the correct procedure, but I navigated to
/Users/{username}/.fleet/preview
and examined the docker-compose file. Everything looked good so I rand
docker-compose pull
and then
docker-compose up -d
and everything started successfully. However when I visited the demo url it prompted me to create a new user instead of using the default Email:
<mailto:admin@example.com|admin@example.com>
Password:
preview1337#
c
I ran into this when installing onto a Rocky Linux 9.3 box. On newer version of Docker, the
docker-compose
command doesn't exist anymore and appears superseded by
docker compose
. I worked around the issue by installing the following script at
/usr/bin/docker-compose
(but would probably need to be installed at
/usr/local/bin/docker-compose
on macOS):
Copy code
#!/bin/sh

docker compose "$@"
fleetctl preview
should probably be updated to account for the removal of the
docker-compose
command.
j
maybe, but it appears both the
docker-compose
and
docker compose
commands work on my MacBook Pro
s
In case anyone missed this on https://osquery.slack.com/archives/C08V7KTJB/p1701919163469489; I managed to fix/get-around this by running the commands without sudo (not sure whether that's the correct approach though, I'm new to both fleet and osquery)
Copy code
npm install -g fleetctl && fleetctl preview
j
I believe I tried that but received permission errors since I already ran the commands with
sudo
. Maybe I’ll try to remove everything and start again without using
sudo
and see what happens.
In case this helps anyone else with issues on macOS - I believe this is due to the permissions set by the macOS node installer. I went through the process to completely remove node using the following command:
sudo rm -rf /usr/local/{bin/{node,npm,npx},lib/node_modules/npm,lib/node,share/man/*/node.*}
I then installed via homebrew. After homebrew finished it wasn’t properly linked and running
brew link node
resulted in some errors. Running
brew link --overwrite node
returned a file/directory permission issue. I eded up changing permissions on the directories and ran the
brew link --overwrite node
command again repeating the process until brew successfully completed the link. Example command: `sudo chown -R `whoami`:admin /usr/local/include/node` which I pulled from https://stackoverflow.com/questions/31691626/cant-brew-install-node. After this completed, I was finally able to run
npm install -g fleetctl
without any errors. (I may have needed to change ownership of another directory from root to my account). But, since I manually ran
docker-compose
earlier, docker desktop already had the images and had created volumes. So when I ran
fleetctl preview
it didn’t return an error but also didn’t launch the container. Finally, I went into Docker Desktop and removed all containers, volumes, and images. Then re-ran
npm install -g fleetctl
(just to be safe) followed by
fleetctl preview
which now re-pulled the image and all the necessary dependencies for the preview environment.
s
@Jonathan Swisher Ah I see, I was running a python version installed via
asdf
. I forgot to mention I did wipe out the
~/.fleet
directory between my attempts as well.