Skip to content

Commit a456248

Browse files
authored
chore!: Remove deprecated commands and plrlctl binary (#579)
* remove stack commands * remove deploy and destroy commands * remove build, bundle and bounce commands * remove push and repos commands * remove link, output, packages commands * remove info and upgrade commands * remove log and proxy commands * remove most of api commands * remove some of common commands * remove unused code * replace ops and workspace commands with mgmt * remove ai commands * remove unused code * remove unused client methods * remove plrlctl * remove unused code and old diagrams * remove unused client methods * update readme * run genmock * update linter and fix errors * remove unused code * remove kind provider and capi leftovers * avoid double go install in ci * update ci action * remove unused code * remove exec, logs and portforward code * fix std.in syscall when building for windows * remove test and template commands * remove vpn commands * remove some workspace commands * move stacks directly under cd category * update descriptions * remove ui * go mod tidy * remove unused code * genmock * remove unused code
1 parent 74f87f4 commit a456248

File tree

306 files changed

+285
-50900
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

306 files changed

+285
-50900
lines changed

.github/workflows/ci.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
actions: read
1919
steps:
2020
- name: Checkout
21-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
2222
- name: Docker meta
2323
id: meta
2424
uses: docker/metadata-action@v4
@@ -164,7 +164,7 @@ jobs:
164164
actions: read
165165
steps:
166166
- name: Checkout
167-
uses: actions/checkout@v3
167+
uses: actions/checkout@v4
168168
- name: Docker meta
169169
id: meta
170170
uses: docker/metadata-action@v4
@@ -229,7 +229,7 @@ jobs:
229229
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
230230
steps:
231231
- name: Checkout code
232-
uses: actions/checkout@v3
232+
uses: actions/checkout@v4
233233
- name: Run Trivy vulnerability scanner in fs mode
234234
uses: aquasecurity/trivy-action@master
235235
with:
@@ -248,7 +248,7 @@ jobs:
248248
name: Unit test
249249
runs-on: ubuntu-latest
250250
steps:
251-
- uses: actions/checkout@v3
251+
- uses: actions/checkout@v4
252252
- uses: actions/setup-go@v5
253253
with:
254254
go-version-file: go.mod
@@ -264,17 +264,18 @@ jobs:
264264
- name: golangci-lint
265265
uses: golangci/golangci-lint-action@v4
266266
with:
267-
version: v1.59.1
267+
version: v1.62.2
268+
skip-cache: true
268269
build:
269270
name: GoReleaser build
270271
runs-on: ubuntu-latest
271272
steps:
272273
- name: Checkout
273-
uses: actions/checkout@v3
274+
uses: actions/checkout@v4
274275
with:
275276
fetch-depth: 0
276277
- name: Setup Go
277-
uses: actions/setup-go@v4.1.0
278+
uses: actions/setup-go@v5
278279
with:
279280
go-version-file: go.mod
280281
- name: GoReleaser (Build)

.goreleaser.yaml

Lines changed: 0 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -27,33 +27,11 @@ builds:
2727
- -X "github.com/pluralsh/plural-cli/pkg/common.Date={{.Date}}"
2828
- -X "github.com/pluralsh/plural-cli/pkg/scm.GitlabClientSecret={{.Env.GITLAB_CLIENT_SECRET}}"
2929
binary: plural
30-
- id: plrlctl
31-
main: ./cmd/plrlctl
32-
targets:
33-
- linux_amd64
34-
- linux_arm64
35-
- windows_amd64
36-
- windows_arm64
37-
- darwin_amd64
38-
- darwin_arm64
39-
env:
40-
- CGO_ENABLED=0
41-
ldflags:
42-
- -s
43-
- -w
44-
- -X "github.com/pluralsh/plural-cli/pkg/common.Version={{.Version}}"
45-
- -X "github.com/pluralsh/plural-cli/pkg/common.Commit={{.Commit}}"
46-
- -X "github.com/pluralsh/plural-cli/pkg/common.Date={{.Date}}"
47-
- -X "github.com/pluralsh/plural-cli/pkg/scm.GitlabClientSecret={{.Env.GITLAB_CLIENT_SECRET}}"
48-
binary: pluralctl
4930

5031
archives:
5132
- id: plural-cli
5233
builds: [plural-cli]
5334
name_template: '{{ .ProjectName }}_{{ .Version }}_{{- title .Os -}}_{{- if eq .Arch "386" -}}i386{{- else -}}{{ .Arch }}{{- end -}}'
54-
- id: plrlctl
55-
builds: [plrlctl]
56-
name_template: '{{ .Binary }}_{{ .Version }}_{{- title .Os -}}_{{- if eq .Arch "386" -}}i386{{- else -}}{{ .Arch }}{{- end -}}'
5735

5836
checksum:
5937
name_template: 'checksums.txt'
@@ -160,70 +138,3 @@ brews:
160138
161139
test: |
162140
system "#{bin}/plural", "--help"
163-
164-
- name: plrlctl
165-
ids: [plrlctl]
166-
repository:
167-
owner: pluralsh
168-
name: homebrew-plural
169-
170-
# Optionally a branch can be provided.
171-
# Defaults to the default repository branch.
172-
branch: main
173-
174-
# Optionally a token can be provided, if it differs from the token provided to GoReleaser
175-
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
176-
177-
# Template for the url which is determined by the given Token (github, gitlab or gitea)
178-
#
179-
# Default depends on the client.
180-
url_template: "https://github.com/pluralsh/plural-cli/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
181-
182-
# Allows you to set a custom download strategy. Note that you'll need
183-
# to implement the strategy and add it to your tap repository.
184-
# Example: https://docs.brew.sh/Formula-Cookbook#specifying-the-download-strategy-explicitly
185-
# Default is empty.
186-
download_strategy: CurlDownloadStrategy
187-
188-
# Git author used to commit to the repository.
189-
# Defaults are shown.
190-
commit_author:
191-
name: plural-bot
192-
193-
194-
# The project name and current git tag are used in the format string.
195-
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
196-
197-
# Folder inside the repository to put the formula.
198-
# Default is the root folder.
199-
directory: Formula
200-
201-
# Your app's homepage.
202-
# Default is empty.
203-
homepage: "https://docs.plural.sh"
204-
205-
# Template of your app's description.
206-
# Default is empty.
207-
description: "CLI to manage and operate a fleet of clusters"
208-
209-
# SPDX identifier of your app's license.
210-
# Default is empty.
211-
license: "MIT"
212-
213-
# Setting this will prevent goreleaser to actually try to commit the updated
214-
# formula - instead, the formula file will be stored on the dist folder only,
215-
# leaving the responsibility of publishing it to the user.
216-
# If set to auto, the release will not be uploaded to the homebrew tap
217-
# in case there is an indicator for prerelease in the tag e.g. v1.0.0-rc1
218-
# Default is false.
219-
skip_upload: "auto"
220-
221-
# Custom block for brew.
222-
# Can be used to specify alternate downloads for devel or head releases.
223-
# Default is empty.
224-
custom_block: |
225-
head "https://github.com/pluralsh/plural-cli.git"
226-
227-
test: |
228-
system "#{bin}/plrlctl", "--help"
229-

Makefile

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ include $(ROOT_DIRECTORY)/hack/include/build.mk
66

77
GCP_PROJECT ?= pluralsh
88
APP_NAME ?= plural-cli
9-
APP_CTL_NAME ?= plrlctl
109
APP_VSN ?= $(shell git describe --tags --always --dirty)
1110
APP_DATE ?= $(shell date -u +"%Y-%m-%dT%H:%M:%S%z")
1211
BUILD ?= $(shell git rev-parse --short HEAD)
@@ -22,12 +21,7 @@ LDFLAGS ?= $(BASE_LDFLAGS) $\
2221
-X "$(PACKAGE)/pkg/common.Date=$(APP_DATE)" $\
2322
-X "$(PACKAGE)/pkg/scm.GitlabClientSecret=${GITLAB_CLIENT_SECRET}" $\
2423
-X "$(PACKAGE)/pkg/scm.BitbucketClientSecret=${BITBUCKET_CLIENT_SECRET}"
25-
WAILS_TAGS ?= desktop,production,ui,debug
26-
WAILS_BINDINGS_TAGS ?= bindings,generate
27-
WAILS_BINDINGS_BINARY_NAME ?= wailsbindings
28-
TAGS ?= $(WAILS_TAGS)
2924
OUTFILE ?= plural.o
30-
OUTCTLFILE ?= plrlctl.o
3125
GOBIN ?= go env GOBIN
3226

3327
# Targets to run before other targets
@@ -42,43 +36,14 @@ git-push:
4236
.PHONY: install
4337
install:
4438
go build -ldflags '$(LDFLAGS)' -o $(GOBIN)/plural ./cmd/plural
45-
go build -ldflags '$(LDFLAGS)' -o $(GOBIN)/plrlctl ./cmd/plrlctl
4639

4740
.PHONY: build-cli
4841
build-cli: ## Build a CLI binary for the host architecture without embedded UI
4942
go build -ldflags='$(LDFLAGS)' -o $(OUTFILE) ./cmd/plural
5043

51-
.PHONY: build-ctl
52-
build-ctl: ## Build a CLI binary for the fleet management
53-
go build -ldflags='$(LDFLAGS)' -o $(OUTCTLFILE) ./cmd/plrlctl
54-
55-
.PHONY: build-cli-ui
56-
build-cli-ui: $(PRE) generate-bindings ## Build a CLI binary for the host architecture with embedded UI
57-
CGO_LDFLAGS=$(CGO_LDFLAGS) go build -tags $(WAILS_TAGS) -ldflags='$(LDFLAGS)' -o $(OUTFILE) ./cmd/plural
58-
59-
.PHONY: build-web
60-
build-web: ## Build just the embedded UI
61-
cd pkg/ui/web && yarn --immutable && yarn build
62-
63-
.PHONY: run-web
64-
run-web: $(PRE) ## Run the UI for development
65-
@CGO_LDFLAGS=$(CGO_LDFLAGS) wails dev -tags ui -browser -skipbindings
66-
67-
# This is somewhat an equivalent of wails `GenerateBindings` method.
68-
# Ref: https://github.com/wailsapp/wails/blob/master/v2/pkg/commands/bindings/bindings.go#L28
69-
.PHONY: generate-bindings
70-
generate-bindings: build-web ## Generate backend bindings for the embedded UI
71-
@echo Building bindings binary
72-
@CGO_LDFLAGS=$(CGO_LDFLAGS) go build -tags $(WAILS_BINDINGS_TAGS) -ldflags='$(LDFLAGS)' -o $(WAILS_BINDINGS_BINARY_NAME) .
73-
@echo Generating bindings
74-
@./$(WAILS_BINDINGS_BINARY_NAME) > /dev/null 2>&1
75-
@echo Cleaning up
76-
@rm $(WAILS_BINDINGS_BINARY_NAME)
77-
7844
.PHONY: release
7945
release:
8046
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -ldflags='$(LDFLAGS)' -o $(OUTFILE) ./cmd/plural
81-
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -ldflags='$(LDFLAGS)' -o $(OUTCTLFILE) ./cmd/plrlctl
8247

8348
.PHONY: goreleaser
8449
goreleaser:
@@ -103,17 +68,6 @@ build: ## Build the Docker image
10368
-t gcr.io/$(GCP_PROJECT)/$(APP_NAME):$(APP_VSN) \
10469
-t $(DKR_HOST)/plural/$(APP_NAME):$(APP_VSN) .
10570

106-
.PHONY: build-ctl
107-
build-ctl: ## Build the plrctl Docker image
108-
docker build --build-arg APP_NAME=$(APP_CTL_NAME) \
109-
--build-arg APP_VSN=$(APP_VSN) \
110-
--build-arg APP_DATE=$(APP_DATE) \
111-
--build-arg APP_COMMIT=$(BUILD) \
112-
-t $(APP_CTL_NAME):$(APP_VSN) \
113-
-t $(APP_CTL_NAME):latest \
114-
-t gcr.io/$(GCP_PROJECT)/$(APP_CTL_NAME):$(APP_VSN) \
115-
-t $(DKR_HOST)/plural/$(APP_CTL_NAME):$(APP_VSN) -f dockerfiles/plrlctl/Dockerfile .
116-
11771
.PHONY: build-cloud
11872
build-cloud: ## build the cloud docker image
11973
docker build --build-arg APP_NAME=$(APP_NAME) \
@@ -186,15 +140,15 @@ test: setup-tests
186140

187141
.PHONY: format
188142
format: ## formats all go code to prep for linting
189-
docker run --rm -v $(PWD):/app -w /app golangci/golangci-lint:v1.59.1 golangci-lint run --fix
143+
docker run --rm -v $(PWD):/app -w /app golangci/golangci-lint:v1.62.2 golangci-lint run --fix
190144

191145
.PHONY: genmock
192146
genmock: ## generates mocks before running tests
193147
hack/gen-client-mocks.sh
194148

195149
.PHONY: lint
196150
lint:
197-
docker run --rm -v $(PWD):/app -w /app golangci/golangci-lint:v1.59.1 golangci-lint run
151+
docker run --rm -v $(PWD):/app -w /app golangci/golangci-lint:v1.62.2 golangci-lint run
198152

199153
.PHONY: delete-tag
200154
delete-tag:

README.md

Lines changed: 12 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,29 @@
11
# Plural CLI
22

3-
The plural cli automates all gitops operations for your deployments of plural applications. The core workflow should mostly be as simple as:
4-
5-
```bash
6-
plural build
7-
plural deploy
8-
```
9-
10-
And if you want to teardown your infrastructure, you can simply run:
11-
12-
```bash
13-
plural destroy
14-
```
15-
16-
To add, update or reconfigure any applications deployed by plural. But it goes even deeper and solves things like:
17-
18-
* Secret management (via a similar mechanism as git-crypt)
19-
* Application Health checking - `plural watch APP`
20-
* Log tailing - `plural logs list APP` and `plural logs tail APP LOGSTREAM`
21-
* Setting up secure proxies into databases, private web UIs - `plural proxy list APP` and `plural proxy connect APP NAME`
3+
Deploying your services using the Plural CLI.
224

235
## Installation
246

25-
There are a number of means to install plural, the simplest is to use our homebrew tap if you're using mac:
7+
The Plural CLI is available on homebrew, a single line install can be done with:
268

279
```bash
2810
brew install pluralsh/plural/plural
2911
```
3012

31-
More detailed instructions for other platforms can be found at https://docs.plural.sh/getting-started#1.-install-plural-cli-and-dependencies
32-
33-
Plural does require a few other cli's to be installed, namely:
34-
* helm
35-
* terraform
36-
* kubectl
37-
* cloud provider cli for the infrastructure you're deploying to, like `awscli`, `gcloud`, etc
38-
* [kind](https://kind.sigs.k8s.io/) if using kind to deploy a local cluster for testing
39-
40-
## Setup
41-
42-
The core workflow is all git based, so you should create a git repository on github or wherever you're using SCM, clone it locally, then run:
13+
If you are using a machine that is not compatible with homebrew,
14+
we recommend simply downloading a pre-built release on github and installing it onto your machines path. The releases can be found here: https://github.com/pluralsh/plural-cli/releases.
4315

44-
```bash
45-
plural init
46-
```
16+
## Requirements
4717

48-
You'll want to then install a bundle for whatever application you'd like, we'll use https://github.com/airbytehq/airbyte as an example. You can search for the bundles using:
18+
Plural does require a few other CLI's to be installed, namely:
19+
* `helm`
20+
* `terraform`
21+
* `kubectl`
22+
* cloud provider CLI for the infrastructure you're deploying to, like `aws`, `az`, `gcloud` etc.
4923

24+
## Quickstart
5025

51-
```bash
52-
plural bundle list airbyte
53-
```
54-
55-
And chose one (using aws as an example cloud provider target) like:
56-
57-
```bash
58-
plural bundle install airbyte airbyte-aws
59-
```
60-
61-
This will set the basic configuration parameters for all the infrastructure needed to install airbyte. Then just run:
62-
63-
```bash
64-
plural build
65-
plural deploy --commit "deploying my first plural app!"
66-
```
67-
68-
To install it.
69-
70-
71-
## Installing the Plural Console
72-
73-
We highly recommend installing the [plural console](https://github.com/pluralsh/console) alongside your plural applications. That can be done easily with:
74-
75-
```bash
76-
plural bundle install console console-aws
77-
plural build
78-
plural deploy --commit "deploying the plural console"
79-
```
26+
Detailed instructions can be found at https://docs.plural.sh/deployments/cli-quickstart.
8027

8128
## Reaching Out
8229

File renamed without changes.

0 commit comments

Comments
 (0)