Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Disable submission to Puppet reporter backend

This commit disables automatic submission to the Puppet reporter service
(https://consumer.app.lumogon.com/api/v1/), the report command now
requires either the `--endpoint` arg to be set, or the
`LUMOGON_ENDPOINT`.
  • Loading branch information...
johnmccabe committed May 23, 2018
1 parent 2652b0e commit 4a93e2c4f885bec9eec8738a1ced35722c03a856
Showing with 14 additions and 14 deletions.
  1. +0 −1 Dockerfile
  2. +6 −10 README.md
  3. +8 −3 cmd/container.go
@@ -5,7 +5,6 @@ WORKDIR /go/src/github.com/puppetlabs/lumogon/
RUN make build

FROM scratch
ENV LUMOGON_ENDPOINT=https://consumer.app.lumogon.com/api/v1/
COPY --from=builder /go/src/github.com/puppetlabs/lumogon/bin/lumogon /
COPY --from=builder /go/src/github.com/puppetlabs/lumogon/certs/ca-certificates.crt /etc/ssl/certs/
ENTRYPOINT ["/lumogon"]
@@ -145,21 +145,17 @@ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock puppet/lumogon sca
/fixtures_ubuntu-xenial_1 ubuntu 16.04
```

### Sending reports to the Lumogon service
### Sending reports to a backend service

Lumogon provides an optional web service that can translate your JSON data into
more human friendly reports.
Lumogon provides the ability to submit gathered reports to an optional endpoint of your choosing.

**NOTE** The Puppet provided reporter backend service and all data has been decommissioned as of May 2018.

``` shell
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock puppet/lumogon report
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock puppet/lumogon report --endpoint https://my-reporter-service.domain.com/
```

The `report` command generates the same data as `scan`, but sends it over HTTPS to
the Lumogon reporting service and returns a URL to view your report.

```
https://reporter.app.lumogon.com/UuokYc0VMgA4oAZYaJRaN6O7xMqakDLsqgHGs0dBmJY=
```
The `report` command generates the same data as `scan`, but sends it to the configured reporting endpoint.

### More ways to use Lumogon

@@ -1,6 +1,7 @@
package cmd

import (
"fmt"
"os"

"github.com/puppetlabs/lumogon/capabilities/registry"
@@ -23,12 +24,16 @@ var scanCmd = &cobra.Command{

var reportCmd = &cobra.Command{
Use: "report",
Short: "Scan one or more containers and send the collected information to the Lumogon service",
Long: `Creates and attaches a container to the specified containers, inspect the container and then output that information as JSON over HTTP `,
Short: "Scan one or more containers and send the collected information to a configured endpoint",
Long: `Creates and attaches a container to the specified containers, inspect the container and then output that information as JSON over HTTP`,
Run: func(cmd *cobra.Command, args []string) {
if opts.ConsumerURL == "" {
opts.ConsumerURL = os.Getenv("LUMOGON_ENDPOINT")
}
if opts.ConsumerURL == "" {
fmt.Fprintln(os.Stderr, "No report endpoint found, please pass the `--endpoint` argument or set the `LUMOGON_ENDPOINT` envvar")
os.Exit(1)
}
scheduler := scheduler.New(args, opts)
scheduler.Run(registry.Registry)
},
@@ -41,7 +46,7 @@ func init() {
reportFlags := reportCmd.Flags()
scanFlags := scanCmd.Flags()

reportFlags.StringVar(&opts.ConsumerURL, "endpoint", "", "Use a custom HTTP endpoint for sending the results of the scan")
reportFlags.StringVar(&opts.ConsumerURL, "endpoint", "", "Set the custom HTTP endpoint for sending the results of the scan, alternatively set the LUMOGON_ENDPOINT envvar")
reportFlags.IntVar(&opts.Timeout, "timeout", 60, "Time in seconds to wait for results, defaults to 60 seconds")
scanFlags.IntVar(&opts.Timeout, "timeout", 60, "Time in seconds to wait for results, defaults to 60 seconds")
}

0 comments on commit 4a93e2c

Please sign in to comment.
You can’t perform that action at this time.