Skip to content

Commit

Permalink
initial deletion of artifact code
Browse files Browse the repository at this point in the history
Signed-off-by: Yee Hing Tong <[email protected]>
  • Loading branch information
wild-endeavor committed Nov 23, 2023
1 parent 9d7e55e commit 72f8b31
Show file tree
Hide file tree
Showing 55 changed files with 6 additions and 5,548 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
component:
- datacatalog
- flyteadmin
- flyteartifacts
# TODO(monorepo): Enable lint flytecopilot
# - flytecopilot
- flyteidl
Expand Down Expand Up @@ -70,7 +69,6 @@ jobs:
component:
- datacatalog
- flyteadmin
- flyteartifacts
- flytecopilot
- flytepropeller
name: Docker Build Images
Expand Down Expand Up @@ -114,7 +112,6 @@ jobs:
component:
- datacatalog
- flyteadmin
- flyteartifacts
- flytecopilot
- flytepropeller
uses: ./.github/workflows/go_generate.yml
Expand Down
42 changes: 0 additions & 42 deletions Dockerfile.flyteartifacts

This file was deleted.

1 change: 0 additions & 1 deletion Dockerfile.sandbox-lite
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ WORKDIR /app/flyte

COPY datacatalog datacatalog
COPY flyteadmin flyteadmin
COPY flyteartifacts flyteartifacts
COPY flytecopilot flytecopilot
COPY flyteidl flyteidl
COPY flyteplugins flyteplugins
Expand Down
8 changes: 0 additions & 8 deletions charts/flyte-sandbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ A Helm chart for the Flyte local sandbox
| file://../flyte-binary | flyte-binary | v0.1.10 |
| https://charts.bitnami.com/bitnami | minio | 12.1.1 |
| https://charts.bitnami.com/bitnami | postgresql | 12.1.9 |
| https://charts.bitnami.com/bitnami | redis | 18.0.1 |
| https://helm.twun.io/ | docker-registry | 2.2.2 |
| https://kubernetes.github.io/dashboard/ | kubernetes-dashboard | 6.0.0 |

Expand Down Expand Up @@ -101,13 +100,6 @@ A Helm chart for the Flyte local sandbox
| postgresql.volumePermissions.enabled | bool | `true` | |
| postgresql.volumePermissions.image.pullPolicy | string | `"Never"` | |
| postgresql.volumePermissions.image.tag | string | `"sandbox"` | |
| redis.auth.enabled | bool | `false` | |
| redis.enabled | bool | `true` | |
| redis.image.pullPolicy | string | `"Never"` | |
| redis.image.tag | string | `"sandbox"` | |
| redis.master.service.nodePorts.redis | int | `30004` | |
| redis.master.service.type | string | `"NodePort"` | |
| redis.replica.replicaCount | int | `0` | |
| sandbox.buildkit.enabled | bool | `true` | |
| sandbox.buildkit.image.pullPolicy | string | `"Never"` | |
| sandbox.buildkit.image.repository | string | `"moby/buildkit"` | |
Expand Down
36 changes: 0 additions & 36 deletions charts/flyte-sandbox/templates/artifacts/deployment.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions charts/flyte-sandbox/templates/artifacts/service.yaml

This file was deleted.

18 changes: 0 additions & 18 deletions charts/flyte-sandbox/templates/proxy/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@ data:
prefix: "/flyteidl.service.SignalService"
route:
cluster: flyte_grpc
- match:
prefix: "/flyteidl.artifact.ArtifactRegistry"
route:
cluster: artifact
{{- end }}
{{- if index .Values "kubernetes-dashboard" "enabled" }}
- match:
Expand Down Expand Up @@ -207,19 +203,5 @@ data:
address: {{ .Release.Name }}-minio
port_value: 9001
{{- end }}
- name: artifact
connect_timeout: 0.25s
type: STRICT_DNS
lb_policy: ROUND_ROBIN
http2_protocol_options: {}
load_assignment:
cluster_name: artifact
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: artifact-service
port_value: 50051
{{- end }}
8 changes: 0 additions & 8 deletions charts/flyte-sandbox/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,6 @@ flyte-binary:
ephemeralStorage: 0
gpu: 0
memory: 0
cloudEvents:
enable: true
cloudEventVersion: v2
type: sandbox
artifacts:
host: localhost
port: 50051
insecure: true
storage:
signedURL:
stowConfigOverride:
Expand Down
5 changes: 0 additions & 5 deletions cmd/single/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,13 @@ type Config struct {
Propeller Propeller `json:"propeller" pflag:",Configuration to disable propeller or any of its components."`
Admin Admin `json:"admin" pflag:",Configuration to disable FlyteAdmin or any of its components"`
DataCatalog DataCatalog `json:"dataCatalog" pflag:",Configuration to disable DataCatalog or any of its components"`
Artifact Artifacts `json:"artifact" pflag:",Configuration to disable Artifact or any of its components"`
}

type Propeller struct {
Disabled bool `json:"disabled" pflag:",Disables flytepropeller in the single binary mode"`
DisableWebhook bool `json:"disableWebhook" pflag:",Disables webhook only"`
}

type Artifacts struct {
Disabled bool `json:"disabled" pflag:",Disables flyteartifacts in the single binary mode"`
}

type Admin struct {
Disabled bool `json:"disabled" pflag:",Disables flyteadmin in the single binary mode"`
DisableScheduler bool `json:"disableScheduler" pflag:",Disables Native scheduler in the single binary mode"`
Expand Down
48 changes: 0 additions & 48 deletions cmd/single/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ package single

import (
"context"
sharedCmd "github.com/flyteorg/flyte/flyteartifacts/cmd/shared"
"github.com/flyteorg/flyte/flyteartifacts/pkg/configuration"
artifactsServer "github.com/flyteorg/flyte/flyteartifacts/pkg/server"
"github.com/flyteorg/flyte/flytestdlib/database"
"net/http"
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
ctrlWebhook "sigs.k8s.io/controller-runtime/pkg/webhook"
Expand Down Expand Up @@ -65,40 +61,6 @@ func startClusterResourceController(ctx context.Context) error {
return nil
}

func startArtifact(ctx context.Context, cfg Artifacts) error {
if cfg.Disabled {
logger.Infof(ctx, "Artifacts server is disabled. Skipping...")
return nil
}
// Roughly copies main/NewMigrateCmd
logger.Infof(ctx, "Artifacts: running database migrations if any...")
migs := artifactsServer.GetMigrations(ctx)
initializationSql := "create extension if not exists hstore;"
dbConfig := artifactsServer.GetDbConfig()
err := database.Migrate(context.Background(), dbConfig, migs, initializationSql)
if err != nil {
logger.Errorf(ctx, "Failed to run Artifacts database migrations. Error: %v", err)
return err
}

g, childCtx := errgroup.WithContext(ctx)

// Rough copy of NewServeCmd
g.Go(func() error {
cfg := configuration.GetApplicationConfig()
serverCfg := &cfg.ArtifactServerConfig
err := sharedCmd.ServeGateway(childCtx, "artifacts", serverCfg, artifactsServer.GrpcRegistrationHook,
artifactsServer.HttpRegistrationHook)
if err != nil {
logger.Errorf(childCtx, "Failed to start Artifacts server. Error: %v", err)
return err
}
return nil
})

return g.Wait()
}

func startAdmin(ctx context.Context, cfg Admin) error {
logger.Infof(ctx, "Running Database Migrations...")
if err := adminServer.Migrate(ctx); err != nil {
Expand Down Expand Up @@ -240,16 +202,6 @@ var startCmd = &cobra.Command{
})
}

if !cfg.Artifact.Disabled {
g.Go(func() error {
err := startArtifact(childCtx, cfg.Artifact)
if err != nil {
logger.Panicf(childCtx, "Failed to start Artifacts server, err: %v", err)
}
return nil
})
}

if !cfg.Propeller.Disabled {
g.Go(func() error {
err := startPropeller(childCtx, cfg.Propeller)
Expand Down
15 changes: 2 additions & 13 deletions docker/sandbox-bundled/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
define FLYTE_BINARY_BUILD
mkdir -p images/tar/$(1)

docker buildx build --ssh default \
docker buildx build \
--build-arg FLYTECONSOLE_VERSION=$(FLYTECONSOLE_VERSION) \
--platform linux/$(1) \
--tag flyte-binary:sandbox \
Expand Down Expand Up @@ -40,20 +40,9 @@ build: flyte manifests
--driver docker-container --driver-opt image=moby/buildkit:master \
--buildkitd-flags '--allow-insecure-entitlement security.insecure' \
--platform linux/arm64,linux/amd64
docker buildx build --ssh default --builder flyte-sandbox --allow security.insecure --load \
docker buildx build --builder flyte-sandbox --allow security.insecure --load \
--tag flyte-sandbox:latest .

# This is here because we want to be able to push locally, not depend on GH actions
.PHONY: build_push
build_push: flyte manifests
[ -n "$(shell docker buildx ls | awk '/^flyte-sandbox / {print $$1}')" ] || \
docker buildx create --name flyte-sandbox \
--driver docker-container --driver-opt image=moby/buildkit:master \
--buildkitd-flags '--allow-insecure-entitlement security.insecure' \
--platform linux/arm64,linux/amd64
docker buildx build --ssh default --builder flyte-sandbox --allow security.insecure --push \
--tag ghcr.io/flyteorg/flyte-sandbox:a_v0.1.1 .

# Port map
# 6443 - k8s API server
# 30000 - Docker Registry
Expand Down
38 changes: 4 additions & 34 deletions flyte-single-binary-local.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# This is a sample configuration file for running single-binary Flyte locally against
# a sandbox.
# gatepr: revert the local dir to reflect home.
# paths were changed to personal to ensure settings didn't get lost.
admin:
# This endpoint is used by flytepropeller to talk to admin
# and artifacts to talk to admin,
Expand All @@ -19,22 +17,22 @@ catalog-cache:

cluster_resources:
standaloneDeployment: false
templatePath: /Users/ytong/.flyte/sandbox/cluster-resource-templates
templatePath: $HOME/.flyte/sandbox/cluster-resource-templates

logger:
show-source: true
level: 3

propeller:
create-flyteworkflow-crd: true
kube-config: /Users/ytong/.flyte/sandbox/kubeconfig
kube-config: $HOME/.flyte/sandbox/kubeconfig
rawoutput-prefix: s3://my-s3-bucket/data

server:
kube-config: /Users/ytong/.flyte/sandbox/kubeconfig
kube-config: $HOME/.flyte/sandbox/kubeconfig

webhook:
certDir: /Users/ytong/.flyte/webhook-certs
certDir: $HOME/.flyte/webhook-certs
localCert: true
secretName: flyte-sandbox-webhook-secret
serviceName: flyte-sandbox-local
Expand Down Expand Up @@ -77,34 +75,6 @@ database:
port: 30001
dbname: flyte
options: "sslmode=disable"
# Point to cloned repo instead.
#
# postgres:
# username: postgres
# password: xxx
# host: 127.0.0.1
# port: 54328
# dbname: app
# options: "sslmode=disable"
cloudEvents:
enable: true
cloudEventVersion: v2
type: sandbox
# For artifact service itself
artifactsServer:
artifactBlobStoreConfig:
type: stow
stow:
kind: s3
config:
disable_ssl: true
v2_signing: true
endpoint: http://localhost:30002
auth_type: accesskey
access_key_id: minio
secret_key: miniostorage
artifactsProcessor:
cloudProvider: Sandbox
storage:
type: stow
stow:
Expand Down
Loading

0 comments on commit 72f8b31

Please sign in to comment.