Skip to content

Commit

Permalink
Finalizaing for v2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ramitsurana committed Jul 27, 2016
1 parent 321bfee commit 7d730c9
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 5 deletions.
22 changes: 18 additions & 4 deletions README.md
Expand Up @@ -39,13 +39,14 @@ Turbo uses some 3rd party tools for giving the best perfomance to the [docker][1

* Glances
* [Minikube][4]
* [Logspout][5]

### Steps to follow

````
$ curl -Lo https://github.com/ramitsurana/turbo/archive/v0.1.tar.gz
$ tar xvf turbov0.1.tar.gz
$ cd turbov0.1
$ curl -Lo https://github.com/ramitsurana/turbo/archive/v0.2.tar.gz
$ tar xvf turbov0.2.tar.gz
$ cd turbov0.2
$ chmod +x turbo
$ sudo mv turbo /usr/local/bin
$ turbo
Expand All @@ -56,11 +57,14 @@ Usage:
Turbo [command]
Available Commands:
api Serves an GUI for turbo
backup backups all your docker stuff
clean Cleans up all your docker images
destroy Erases off all the exited containers
kickstart restarts all your containers quickly
log Uses logspout to collect your docker logs
monitor To monitor your containers
refresh Completely removes and re-installs docker
replica To create Replicas of your containers
rkt Installs and configures rkt
search Search images from multiple registries
Expand All @@ -73,14 +77,22 @@ Flags:
-t, --toggle Help message for toggle
Use "Turbo [command] --help" for more information about a command.
````

## Commands

* [Api](#api)
* [Backup](#backup)
* [Clean](#clean)
* [Destroy](#destroy)
* [Kickstart](#kickstart)
* [Log](#log)
* [Monitor](#monitor)
* [Refresh](#refresh)
* [Replica](#replica)
* [Rkt](#rkt)
* [Search](#search)
* [Ship](#ship)
* [Version](#version)

Expand Down Expand Up @@ -137,7 +149,8 @@ $ turbo version

## Contributing

Contributions can be made easily by making PR's and opening issues on the github repo.Big Thank you to all the [contributors][3] !
Contributions can be made easily by making PR's and opening issues on the github repo.
Big Thank you to all the [contributors][3] for your awesome contributions !

## License

Expand All @@ -147,3 +160,4 @@ Contributions can be made easily by making PR's and opening issues on the github
[2]: http://ramitsurana.github.io/turbo
[3]: https://github.com/ramitsurana/turbo/graphs/contributors
[4]: http://github.com/kubernetes/minikube
[5]: https://github.com/gliderlabs/logspout
47 changes: 47 additions & 0 deletions cmd/log.go
@@ -0,0 +1,47 @@
// Copyright © 2016 Ramit Surana <ramitsurana@gmail.com>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package cmd

import (
"fmt"
"os/exec"
"log"
"github.com/spf13/cobra"
"os"
)

var logCmd = &cobra.Command{
Use: "log",
Short: "Uses logspout to collect your docker logs",
Long: `Runs and configures logspout on your enviorment `,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("Running logspout ...")
cmd1 := exec.Command("docker", "run", "-d",
"--volume=/var/run/docker.sock:/var/run/docker.sock",
"--publish=127.0.0.1:8000:80",
"gliderlabs/logspout")
err1 := cmd1.Start()
if err1 != nil {
log.Fatal(err1)
log.Printf("Failed to run logspout")
os.Exit(1)
}
fmt.Println("Logspout has successfully collected logs.Try running curl http://127.0.0.1:8000/logs")
},
}

func init() {
RootCmd.AddCommand(logCmd)
}
2 changes: 1 addition & 1 deletion cmd/version.go
Expand Up @@ -25,7 +25,7 @@ var versionCmd = &cobra.Command{
Short: "prints the current version number of turbo",
Long: `Print the version number of Turbo`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("0.3")
fmt.Println("0.2")
},
}

Expand Down
Binary file modified turbo
Binary file not shown.

0 comments on commit 7d730c9

Please sign in to comment.