From 045ab6e407ea942baf118088800428cf7c685ad7 Mon Sep 17 00:00:00 2001 From: Omar Jarjur Date: Wed, 24 Jan 2024 17:24:14 +0000 Subject: [PATCH] Remove no-longer-supported Dockerfile --- Makefile | 7 +--- README.md | 29 ----------------- config/Dockerfile | 40 ----------------------- config/app.yaml | 37 --------------------- config/gce.sh | 34 -------------------- config/gce.yaml | 82 ----------------------------------------------- 6 files changed, 1 insertion(+), 228 deletions(-) delete mode 100644 config/Dockerfile delete mode 100644 config/app.yaml delete mode 100644 config/gce.sh delete mode 100644 config/gce.yaml diff --git a/Makefile b/Makefile index f112b53..2f60258 100644 --- a/Makefile +++ b/Makefile @@ -15,9 +15,4 @@ fmt: clean: rm -r bin || true - rm -r resources || true - -# The following rule copies the locally built binary into our publicly readable -# download location. This will fail for anyone who is not on the core todo-tracks team. -publish: build - gsutil cp -a public-read ${GOPATH:~}/bin/todos gs://todo-track-bin/todos + rm -r resources || true \ No newline at end of file diff --git a/README.md b/README.md index 542cc6c..29aaaa3 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # TODO Tracks -[![Build Status](https://travis-ci.org/google/todo-tracks.svg?branch=master)](https://travis-ci.org/google/todo-tracks) - TODO Tracks is a tool to let users get a handle on the various TODOs they or their teammate have added over time. This allows people to track progress by examining the TODOs remaining. @@ -14,16 +12,11 @@ Use cases: * List the TODOs in a branch. * Examine when a TODO was added, removed, and who added it. * Show which branches a TODO is in. -* (coming soon) Show a diff of the TODOs between two branches. ## Disclaimer This is not an official Google product. - - ## Prerequisites Building requires the Go tools and GNU Make. Running the built binary requires the git command line tool. @@ -42,9 +35,6 @@ And then launch it: bin/todos - The tracker requires that it be started in a directory that contains at least one git repo, and it shows the TODOs from every git repo under that directory. The UI for the tracker is a webserver which defaults to listening on port 8080. To use a different port, pass it as an argument to the "--port" flag: @@ -54,22 +44,3 @@ The UI for the tracker is a webserver which defaults to listening on port 8080. For more details about the supported command line flags, pass in the "--help" flag. bin/todos --help - - - -## Running in Google Compute Engine - -We provide a pre-built binary and config files for deploying the tool to a GCE VM -using Google Deployment Manager. - -Assuming you already have the gcloud preview commands installed, run the following steps: - - mkdir todo-tracks - cd todo-tracks - wget http://storage.googleapis.com/todo-track-bin/config/gce.sh -O gce.sh - wget http://storage.googleapis.com/todo-track-bin/config/gce.yaml -O gce.yaml - gcloud preview deployment-manager templates create todo_tracks_template --template-file gce.yaml - gcloud preview deployment-manager deployments --region=us-central1 create --template=todo_tracks_template todo_tracks_deployment - diff --git a/config/Dockerfile b/config/Dockerfile deleted file mode 100644 index f547d50..0000000 --- a/config/Dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright 2014 Google Inc. All rights reserved. -# -# 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. - -FROM ubuntu - -ENV DEBIAN_FRONTEND noninteractive -RUN apt-get update && apt-get upgrade -y && \ - apt-get install -y -qq --no-install-recommends \ - ca-certificates \ - git \ - curl \ - python \ - unzip - -ADD http://storage.googleapis.com/todo-track-bin/todos /bin/todos -RUN chmod +x /bin/todos - -ADD https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.zip /google-cloud-sdk.zip -RUN unzip /google-cloud-sdk.zip -d / -RUN rm /google-cloud-sdk.zip -RUN /google-cloud-sdk/install.sh --usage-reporting=true --path-update=true --bash-completion=true --rc-path=/.bashrc --disable-installation-options -ENV PATH /google-cloud-sdk/bin:$PATH - -ADD gce.sh /bin/gce.sh -RUN chmod +x /bin/gce.sh -RUN touch /var/log/cron.log - -EXPOSE 8080 -CMD ["/bin/sh", "-c", "/bin/gce.sh & cron; tail -f /var/log/cron.log"] diff --git a/config/app.yaml b/config/app.yaml deleted file mode 100644 index dcc6553..0000000 --- a/config/app.yaml +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright 2014 Google Inc. All rights reserved. -# -# 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. - -# Config file for running under Google App Engine. -# This creates a new Module named "todo-tracks" in your project, so you -# should make sure that you have your default module deployed first, otherwise -# this one will become the default. - -# To deploy this module to your app, run the following command: -# gcloud preview app deploy config/app.yaml - -module: todo-tracks -version: v1 -runtime: custom -vm: true -api_version: 1 -threadsafe: on - -automatic_scaling: - max_num_instances: 1 -vm_settings: - service_account_scopes: https://www.googleapis.com/auth/cloud-platform -handlers: -- url: /.* - script: main.application - login: admin diff --git a/config/gce.sh b/config/gce.sh deleted file mode 100644 index 187ce5e..0000000 --- a/config/gce.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -# Copyright 2014 Google Inc. All rights reserved. -# -# 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. - -# Helper script for launching the TODO tracker inside of a GCE VM. -# This needs to be run using root privileges - -# Initialize/clone git repo. -echo "Cloning the project repo" -mkdir -p repo && cd repo -export PROJECT=$(curl http://metadata.google.internal/computeMetadata/v1/project/project-id -H "Metadata-Flavor: Google") -gcloud init ${PROJECT} - -echo "Configuring the cron job" -# Configure cronjob to pull git repo every minute. -echo "* * * * * su -s /bin/sh root -c 'cd $(pwd)/${PROJECT}/default && /usr/bin/git pull'" >> /tmp/crontab.txt -crontab /tmp/crontab.txt - -echo "Starting the TODO Tracks server" -# Start running todo server. -cd ${PROJECT}/default; /bin/todos - diff --git a/config/gce.yaml b/config/gce.yaml deleted file mode 100644 index 226097c..0000000 --- a/config/gce.yaml +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright 2014 Google Inc. All rights reserved. -# -# 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. - -# Google Deployment Manager template for creating a todo tracker deployment in a project -# Usage: -# $ gcloud components update -# $ gcloud components update preview -# $ gcloud preview deployment-manager templates create todo_tracks_template --template-file config/gce.yaml -# $ gcloud preview deployment-manager deployments --region=us-central1 create --template=todo_tracks_template todo_tracks_deployment -name: todo-tracks -modules: - network: - type: NETWORK - networkModule: - IPv4Range: "10.240.0.0/16" - description: "Network for app" - firewall: - type: FIREWALL - firewallModule: - network: "network" - sourceRanges: [ "0.0.0.0/0" ] - allowed: - - IPProtocol: "tcp" - ports: ["22", "80", "8443", "8080"] - todo: - type: REPLICA_POOL - replicaPoolModule: - numReplicas: 1 - replicaPoolParams: - v1beta1: - baseInstanceName: "todos-instance" - machineType: "n1-standard-1" - zone: "us-central1-a" - onHostMaintenance: TERMINATE - networkInterfaces: - - network: "network" - accessConfigs: - - name: External NAT - type: ONE_TO_ONE_NAT - serviceAccounts: - - email: default - scopes: [ - "https://www.googleapis.com/auth/cloud-platform", - ] - autoRestart: true - initAction: install-todo - disksToCreate: - - boot: true - autoDelete: true - initializeParams: - sourceImage: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20140828 - diskSizeGb: 50 - -actions: - install-todo: - commands: [ - # First set up the VM to have the appropriate pre-requisites - # Install git from backport, base wheezy git is 1.7.x which isn't - "apt-get -qqy update", - "apt-get -qqy -t wheezy-backports install git", - - # Update gcloud to have the preview components (which includes deployment-manager) - "gcloud --quiet components update", - "gcloud --quiet components update preview", - - # Finally, copy over todo binary from Google Cloud Storage bucket, and set it up. - "mkdir -p /bin && wget http://storage.googleapis.com/todo-track-bin/todos -O /bin/todos", - # Set executable bit on todo binary. - "chmod +x /bin/todos", - "%file:gce.sh", - ]