Commit Graph

316 Commits

Author SHA1 Message Date
Thordur Bjornsson
6a4d50c7a6 ensure email and passwords are set during setup (#1786) 2018-05-17 08:29:04 -06:00
Zachary Wasserman
d7b0abd782
Clean up flag descriptions (#1778) 2018-05-09 16:54:07 -07:00
Zachary Wasserman
6e6e390346
Add interactive login support (#1771) 2018-05-08 18:34:09 -07:00
Mike Arpaia
ab23e60a98
Add fleetctl get label, pack, query for individual items by name (#1768)
This PR adds support for getting resources by name.

```
$ fleetctl get queries
no queries found

$ fleetctl apply -f ./query.yaml
[+] applied 1 queries

$ fleetctl get queries
+-----------------+--------------------------------+--------------------------------+
|      NAME       |          DESCRIPTION           |             QUERY              |
+-----------------+--------------------------------+--------------------------------+
| osquery_version | The version of the Launcher    | select launcher.version,       |
|                 | and Osquery process            | osquery.version from           |
|                 |                                | kolide_launcher_info launcher, |
|                 |                                | osquery_info osquery;          |
+-----------------+--------------------------------+--------------------------------+

$ fleetctl get query osquery_version
apiVersion: v1
kind: query
spec:
  description: The version of the Launcher and Osquery process
  name: osquery_version
  query: select launcher.version, osquery.version from kolide_launcher_info launcher,
    osquery_info osquery;
```
2018-05-08 18:10:01 -06:00
Zachary Wasserman
e8cd007810
Consistent permissions for ~/.fleet/config file (#1772) 2018-05-08 17:04:38 -07:00
Mike Arpaia
64a75c3b57
fleetctl get labels, queries, and packs (#1764) 2018-05-07 20:09:37 -06:00
Mike Arpaia
20fb50a7a6
Add fleetctl delete command (#1765) 2018-05-07 20:07:00 -06:00
Mike Arpaia
2795a61b3c
Working prototype of fleetctl apply (#1762) 2018-05-07 17:50:20 -06:00
Mike Arpaia
018e10ea66
Add fleetctl config and auth commands (#1751)
```
$ fleetctl config set address https://localhost:8080
[+] Set the "address" config key to "https://localhost:8080" in the "default" context

$ fleetctl config set ignore_tls true
[+] Set the "ignore_tls" config key to "true" in the "default" context

$ fleetctl setup --email mike@arpaia.co --password "abc123"
[+] Fleet setup successful and context configured!

$ cat ~/.fleet/config
contexts:
  default:
    address: https://localhost:8080
    email: mike@arpaia.co
    ignore_tls: true
    token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uX2tleSI6IlUvdm05Vk9wSG0xUlA4SUtjQnBhb2ovWlo1TXppSEVXcFRCNFNPb2tHQnNLUFpDQXFieVpWWnpJb0UvczQzcWkyd1pHZXJOa29SNFVIQ2hNZUc0K09RPT0ifQ.rHawSN8JvD4jjWAPTYX2Ep9ZpMt3u4mSIQcu920C-_s

$ fleetctl logout
[+] Fleet logout successful and local token cleared!

$ cat ~/.fleet/config
contexts:
  default:
    address: https://localhost:8080
    email: mike@arpaia.co
    ignore_tls: true
    token: ""
```
2018-05-04 10:53:21 -06:00
Mike Arpaia
920f4afab6
Scaffold the login command (#1748) 2018-05-01 16:58:53 -06:00
Mike Arpaia
93a346463b
New fleetctl CLI structure (#1719) 2018-05-01 12:14:05 -06:00
Mike Arpaia
76ce270cbd
include forgotten fleetctl config command 2017-11-12 11:59:39 -07:00
Mike Arpaia
796e0af8be
Initial CLI and file format for fleetctl
This PR implements a program called `fleetctl` which scaffolds a high level CLI interface which can be used to manage a Fleet server. Configuration is articulated using an intent-based API that resembles the API that is used to configure Kubernetes clusters. The idea here is to use the Kubernetes file format as a pattern to reduce the need for operators to become too intimately familiar with dramatically different file formats. (#1578)
2017-11-12 11:58:19 -07:00
Victor Vrantchan
5ad562a952 refactor gRPC endpoints with launcher packages in mind (#1582)
The launcher service implementation is an adapter around the TLS service.
All launcher methods that have an equivalent in TLS pass the business logic to the
TLS API.

Closes #1565
2017-10-24 19:55:32 -04:00
Victor Vrantchan
c496eb8df2 add health package to create reusable healthz checks. (#1583)
Moved the healthz handler and exposed the CheckHealth method so the same healthchecks could be
used by TLS, gRPC and any other APIs.
2017-10-23 14:39:15 -04:00
Mike Arpaia
1e16b12638 Move cli directory to cmd/fleet (#1560) 2017-10-12 10:42:13 -06:00