07/30/2016: Laravel 'Class log does not exist' RESOLVED
In order to track down this issue, I followed advice that I saw at https://laracasts.com/discuss/channels/laravel/error-when-upgrading-to-52-class-log-does-not-exist.
I edited vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php as follows:
protected function loadConfigurationFiles(Application $app, RepositoryContract $repository)
{
foreach ($this->getConfigurationFiles($app) as $key => $path) {
var_dump('file: ' . $key . ' -- path: ' . $path);
}
foreach ($this->getConfigurationFiles($app) as $key => $path) {
$repository->set($key, require $path);
var_dump('loaded key: ' . $key . ' -- path: ' . $path);
}
}
Then I ran ‘php artisan’ which resulted in:
string(69) "file: filesystems -- path: /home/forge/default/config/filesystems.php"
string(71) "file: broadcasting -- path: /home/forge/default/config/broadcasting.php"
string(63) "file: services -- path: /home/forge/default/config/services.php"
string(57) "file: cache -- path: /home/forge/default/config/cache.php"
string(53) "file: app -- path: /home/forge/default/config/app.php"
string(61) "file: compile -- path: /home/forge/default/config/compile.php"
string(63) "file: database -- path: /home/forge/default/config/database.php"
string(55) "file: auth -- path: /home/forge/default/config/auth.php"
string(89) "file: laravel-menu.settings -- path: /home/forge/default/config/laravel-menu/settings.php"
string(83) "file: laravel-menu.views -- path: /home/forge/default/config/laravel-menu/views.php"
string(61) "file: session -- path: /home/forge/default/config/session.php"
string(55) "file: view -- path: /home/forge/default/config/view.php"
string(61) "file: entrust -- path: /home/forge/default/config/entrust.php"
string(55) "file: mail -- path: /home/forge/default/config/mail.php"
string(57) "file: queue -- path: /home/forge/default/config/queue.php"
string(75) "loaded key: filesystems -- path: /home/forge/default/config/filesystems.php"
string(77) "loaded key: broadcasting -- path: /home/forge/default/config/broadcasting.php"
string(69) "loaded key: services -- path: /home/forge/default/config/services.php"
string(63) "loaded key: cache -- path: /home/forge/default/config/cache.php"
You can see that Laravel wants to load 15 files but only four were loaded correctly. Therefore, the fifth file (app.php) has some kind of error.
In my particular case, the ending comma was missing from one of the lines.
07/19/2016: How I Got Hashicorp Vault to Run on Raspberry PI
Notes for Research
- https://www.katacoda.com/courses/docker-production/vault-secrets
- https://github.com/csawyerYumaed/vault-docker
- https://github.com/aerofs/gockerize
- https://github.com/CenturyLinkLabs/golang-builder
- https://gist.github.com/voxxit/dd6f95398c1bdc9f1038
- https://github.com/calavera/docker-volume-keywhiz
- https://github.com/defunctzombie/docket
- https://github.com/ehazlett/docker-volume-libsecret
- https://github.com/AngryBytes/docker-surgery
- https://www.vaultproject.io/intro/getting-started/apis.html
References
- http://elasticcompute.io/2016/01/21/runtime-secrets-with-docker-containers/
Content
These steps result in Hashicorp Vault running in development mode. Do NOT use in production without proper research.
All of these steps are done on a Raspberry PI.
- Connect to the RPI
ssh -oStrictHostKeyChecking=no -oCheckHostIP=no pirate@pi1.local
- Create a project directory
mkdir -p projects/armhf-vault
- Connect to the project directory
cd projects/armhf-vault
- Create a Dockerfile
cat << EOF > Dockerfile
FROM container4armhf/armhf-alpine:3.4
MAINTAINER Christopher 'Chief' Najewicz <chief@beefdisciple.com>
ENV version=0.6.0
ENV os=linux
ENV arch=arm
ADD https://releases.hashicorp.com/vault/${version}/vault_${version}_${os}_${arch}.zip /tmp/vault.zip
RUN \
cd /bin &&\
unzip /tmp/vault.zip &&\
chmod +x /bin/vault &&\
rm /tmp/vault.zip &&\
apk update &&\
apk add ca-certificates
EXPOSE 8200
VOLUME /etc/vault.hcl
ENTRYPOINT ["/bin/vault", "server"]
CMD ["-config=/etc/vault.hcl"]
EOF
- Create a vault configuration file.
cat << EOF > vault.hcl
listener "tcp" {
address = "0.0.0.0:8200"
tls_disable = 1
}
EOF
- Create a script to build the image.
cat << EOF > build-image.sh
docker build -t medined/armhf-vault .
EOF
- Create a script to run the image.
cat << EOF > run-image.sh
docker run \
--rm \
--name vault-dev \
--memory-swap -1 \
-v "vault.hcl:/etc/vault.hcl"
-p 8200:8200 \
medined/armhf-vault -dev
EOF
- Make the scripts executable.
chmod +x *.sh
- Build the image.
./build-image.sh
- Run the image.
./run-image.sh
- Open a new terminal and connect to the RPI
ssh -oStrictHostKeyChecking=no -oCheckHostIP=no pirate@pi1.local
- Run a shell inside the vault container
docker exec -it vault-dev /bin/sh
- Export the vault http address.
export VAULT_ADDR=http://127.0.0.1:8200
- Now you can use the vault command.
vault status
- Alternatively you can use wget
http://127.0.0.1:8200/v1/sys/seal-status