

Docker for mac vagrant software#

There are many benefits to using virtualization over installing software directly on your local machine (as MAMP does for example): SUMO_SOURCES_JSON: ‘/etc/sumo-sources.json’Īnd the sumo-sources.json are able to send to tcp/udp port 514 and watch for log files into /var/log/containers-logs.Before Docker came on the scene Vagrant was the go-to solution for creating development environments that can be configured independently of your machine and shared with a team. SUMO_COLLECTOR_NAME: ‘nodejsapp-collector’ # Create a mapping between host and container to read log files # Folder containing Dockerfile to build the sumologic collector image # TODO use a wildcard address or DOCKER_HOST # configure the nodejsapp container to log any syslog to sumologic collector locally (available since we linked this container witht he sumodocker one) var/log/container-logs:/var/log/container-logs # Create a mapping between host and container to write log files # Folder containing the Dockerfile to build the NodeJS app It already provides docker images and you can create a simple NodeJS app using default node images. Using docker-compose, it became really simple to redirect a container’s syslog and application logs to Sumo Logic. We decided to try using Docker to package our app into something that would be easy to deploy and integrates with Sumo Logic using their agent to send our logs to their server. This is where Docker and Sumo Logic come in. We realized that having ssh open on our web server is not that secure, and perhaps we shouldn’t use a vanilla VM to start from. Our approach did not provide an easy path to receiving alerts when something goes wrong. In retrospect, it was not that easy to access the error logs using this approach, especially as the team grows. When something went wrong it was easy enough to ssh to the VM, switch to the web app server user, and open the error log file from the terminal: (ssh su - webUser less path/filename.log).

Our initial approach was to deploy our NodeJS server to a VM and log errors with console.error logs.

Over the past few weeks, as we were building some small internal apps, we soon noticed that there was no easy way to access our error logs. The software development team at Macadamian is continually exploring new ways to improve our DevOps practices.
