Skip to content

Commit

Permalink
Update irodsfs and irodsfs-pool, update configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
iychoi committed Dec 9, 2022
1 parent da01d47 commit 3a03efe
Show file tree
Hide file tree
Showing 14 changed files with 59 additions and 92 deletions.
16 changes: 2 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
PKG=github.com/cyverse/irods-csi-driver
CSI_DRIVER_BUILD_IMAGE=irods_csi_driver_build
CSI_DRIVER_BUILD_DOCKERFILE=deploy/image/irods_csi_driver_build.dockerfile
FUSE_CLIENT_BUILD_IMAGE=irods_fuse_client_build
FUSE_CLIENT_BUILD_DOCKERFILE=deploy/image/irods_fuse_build.dockerfile
CSI_DRIVER_POOL_BUILD_IMAGE=irods_csi_driver_pool_build
CSI_DRIVER_POOL_BUILD_DOCKERFILE=deploy/image/irods_csi_driver_pool_build.dockerfile
CSI_DRIVER_IMAGE?=cyverse/irods-csi-driver
CSI_DRIVER_DOCKERFILE=deploy/image/irods_csi_driver_image.dockerfile
CSI_DRIVER_POOL_IMAGE?=cyverse/irods-csi-driver-pool
CSI_DRIVER_POOL_DOCKERFILE=deploy/image/irods_csi_driver_pool_image.dockerfile
VERSION=v0.8.7
VERSION=v0.9.0
GIT_COMMIT?=$(shell git rev-parse HEAD)
BUILD_DATE?=$(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
LDFLAGS?="-X ${PKG}/pkg/common.driverVersion=${VERSION} -X ${PKG}/pkg/common.gitCommit=${GIT_COMMIT} -X ${PKG}/pkg/common.buildDate=${BUILD_DATE}"
Expand All @@ -24,20 +20,12 @@ irods-csi-driver:
mkdir -p bin
CGO_ENABLED=0 GOOS=linux go build -ldflags ${LDFLAGS} -o bin/irods-csi-driver ./cmd/

.PHONY: fuse_build
fuse_build:
docker build -t $(FUSE_CLIENT_BUILD_IMAGE):latest -f $(FUSE_CLIENT_BUILD_DOCKERFILE) .

.PHONY: driver_pool_build
driver_pool_build:
docker build -t $(CSI_DRIVER_POOL_BUILD_IMAGE):latest -f $(CSI_DRIVER_POOL_BUILD_DOCKERFILE) .

.PHONY: driver_build
driver_build:
docker build -t $(CSI_DRIVER_BUILD_IMAGE):latest -f $(CSI_DRIVER_BUILD_DOCKERFILE) .

.PHONY: image
image: fuse_build driver_pool_build driver_build
image: driver_build
docker build -t $(CSI_DRIVER_POOL_IMAGE):latest -f $(CSI_DRIVER_POOL_DOCKERFILE) .
docker build -t $(CSI_DRIVER_IMAGE):latest -f $(CSI_DRIVER_DOCKERFILE) .

Expand Down
7 changes: 2 additions & 5 deletions deploy/image/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

Dockerfiles in this directory is used to build the driver or packaging the driver for release.

- **irods_fuse_build.dockerfile** : Build iRODS FUSE Client
- **irods_fuse_pool_server_build.dockerfile** : Build iRODS FUSE Pool Server
- **irods_csi_driver_pool_build.dockerfile** : Build iRODS FUSE Pool Server for CSI Driver
- **irods_csi_driver_build.dockerfile** : Build iRODS CSI Driver
- **irods_csi_driver_pool_image.dockerfile** : iRODS FUSE Pool Server Release package (includes iRODS FUSE Pool Server)
- **irods_csi_driver_image.dockerfile** : iRODS CSI Driver Release package (includes CSI Driver code, iRODS-FUSE, NFS Client and Webdav Client (Davfs2))
- **irods_csi_driver_pool_image.dockerfile** : iRODS FUSE Pool Server
- **irods_csi_driver_image.dockerfile** : iRODS CSI Driver Release (includes CSI Driver code, iRODS-FUSE, NFS Client and Webdav Client (Davfs2))
17 changes: 13 additions & 4 deletions deploy/image/irods_csi_driver_image.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,23 @@ ARG DEBIAN_FRONTEND=noninteractive

# Setup Utility Packages
RUN apt-get update && \
apt-get install -y wget fuse apt-transport-https lsb-release gnupg
apt-get install -y wget curl fuse apt-transport-https lsb-release gnupg

# Setup NFS Client and WebDAV Client
RUN apt-get install -y nfs-common davfs2

### Install irodsfs
RUN mkdir -p /tmp/irodsfs && \
mkdir -p /var/lib/irodsfs
RUN curl -L https://github.com/cyverse/irodsfs/releases/download/v0.8.2/irodsfs-v0.8.2-linux-amd64.tar.gz --output /tmp/irodsfs/irodsfs.tar.gz
RUN tar zxvf /tmp/irodsfs/irodsfs.tar.gz -C /tmp/irodsfs && \
cp /tmp/irodsfs/irodsfs /usr/bin && \
rm -rf /tmp/irodsfs

ADD https://raw.githubusercontent.com/cyverse/irodsfs/v0.8.2/mount_exec/mount.irodsfs \
/sbin/mount.irodsfs
RUN chmod +x /sbin/mount.irodsfs

### Install dumb-init
ADD https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_x86_64 \
/usr/bin/dumb-init
Expand All @@ -33,8 +45,5 @@ WORKDIR /opt/

# Setup CSI Driver
COPY --from=irods_csi_driver_build:latest ${CSI_DRIVER_SRC_DIR}/bin/irods-csi-driver /usr/bin/irods-csi-driver
# Setup iRODS FUSE Lite
COPY --from=irods_fuse_client_build:latest ${IRODS_FUSE_DIR}/mount_exec/mount.irodsfs /sbin/mount.irodsfs
COPY --from=irods_fuse_client_build:latest ${IRODS_FUSE_DIR}/bin/irodsfs /usr/bin/irodsfs

ENTRYPOINT ["/usr/bin/dumb-init", "--", "/usr/bin/irods-csi-driver"]
21 changes: 0 additions & 21 deletions deploy/image/irods_csi_driver_pool_build.dockerfile

This file was deleted.

16 changes: 10 additions & 6 deletions deploy/image/irods_csi_driver_pool_image.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,19 @@ LABEL maintainer="Illyoung Choi <[email protected]>"
LABEL version="0.1"
LABEL description="iRODS CSI Driver Pool Image"

ARG IRODS_FUSE_POOL_SERVER_DIR="/opt/irodsfs-pool"
ARG DEBIAN_FRONTEND=noninteractive

# Setup Utility Packages
RUN apt-get update && \
apt-get install -y wget apt-transport-https lsb-release gnupg
apt-get install -y wget curl apt-transport-https lsb-release gnupg

### Install irodsfs-pool
RUN mkdir -p /tmp/irodsfs-pool && \
mkdir -p /var/lib/irodsfs-pool
RUN curl -L https://github.com/cyverse/irodsfs-pool/releases/download/v0.6.3/irodsfs-pool-v0.6.3-linux-amd64.tar.gz --output /tmp/irodsfs-pool/irodsfs-pool.tar.gz
RUN tar zxvf /tmp/irodsfs-pool/irodsfs-pool.tar.gz -C /tmp/irodsfs-pool && \
cp /tmp/irodsfs-pool/irodsfs-pool /usr/bin && \
rm -rf /tmp/irodsfs-pool

### Install dumb-init
ADD https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_x86_64 \
Expand All @@ -25,7 +32,4 @@ RUN chmod +x /usr/bin/dumb-init

WORKDIR /opt/

# Setup iRODS FUSE Lite Pool Server
COPY --from=irods_csi_driver_pool_build:latest ${IRODS_FUSE_POOL_SERVER_DIR}/bin/irodsfs-pool /usr/bin/irodsfs-pool

ENTRYPOINT ["/usr/bin/dumb-init", "--", "/usr/bin/irodsfs-pool", "-f"]
ENTRYPOINT ["/usr/bin/dumb-init", "--", "/usr/bin/irodsfs-pool", "-f", "--data_root", "/var/lib/irodsfs-pool"]
21 changes: 0 additions & 21 deletions deploy/image/irods_fuse_build.dockerfile

This file was deleted.

5 changes: 3 additions & 2 deletions deploy/kubernetes/base/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,14 @@ spec:
image: cyverse/irods-csi-driver-pool:latest
args:
- --cache_size_max=$(CACHE_SIZE_MAX)
- --cache_root=/irodsfs_pool_cache
- --temp_root=/tmp/irodsfs_pool_temp
- --data_root=$(IRODSFS_POOL_DATA)
- --endpoint=$(IRODSFS_POOL_ENDPOINT)
- --prometheus_exporter_port=$(PROMETHEUS_EXPORTER_PORT)
env:
- name: CACHE_SIZE_MAX
value: "21474836480"
- name: IRODSFS_POOL_DATA
value: /irodsfs_pool_data
- name: IRODSFS_POOL_ENDPOINT
value: unix:///csi/pool.sock
- name: PROMETHEUS_EXPORTER_PORT
Expand Down
4 changes: 2 additions & 2 deletions deploy/kubernetes/overlays/stable/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ bases:
- ../../base
images:
- name: cyverse/irods-csi-driver
newTag: v0.8.7
newTag: v0.9.0
- name: cyverse/irods-csi-driver-pool
newTag: v0.8.7
newTag: v0.9.0
- name: quay.io/k8scsi/csi-provisioner
newTag: v1.6.0
- name: quay.io/k8scsi/livenessprobe
Expand Down
4 changes: 2 additions & 2 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
appVersion: "0.8.7"
appVersion: "0.9.0"
name: irods-csi-driver
description: A Helm chart for iRODS CSI Driver
version: 0.8.7
version: 0.9.0
kubeVersion: ">=1.14.0-0"
home: https://github.com/cyverse/irods-csi-driver
sources:
Expand Down
2 changes: 1 addition & 1 deletion helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ helm install irods-csi-driver -f user_values.yaml --namespace kube-system .
```shell script
helm upgrade irods-csi-driver \
--install . \
--version 0.8.7 \
--version 0.9.0 \
--namespace kube-system \
-f values.yaml
```
Expand Down
3 changes: 3 additions & 0 deletions helm/templates/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,13 @@ spec:
image: "{{ .Values.nodeService.irodsPool.image.repository }}:{{ .Values.nodeService.irodsPool.image.tag }}"
imagePullPolicy: {{ .Values.nodeService.irodsPool.image.pullPolicy }}
args:
- --data_root=$(IRODSFS_POOL_DATA)
- --endpoint=$(IRODSFS_POOL_ENDPOINT)
- --prometheus_exporter_port=$(PROMETHEUS_EXPORTER_PORT)
{{- toYaml .Values.nodeService.irodsPool.extraArgs | nindent 12 }}
env:
- name: IRODSFS_POOL_DATA
value: /irodsfs_pool_data
- name: IRODSFS_POOL_ENDPOINT
value: unix:///csi/pool.sock
- name: PROMETHEUS_EXPORTER_PORT
Expand Down
2 changes: 0 additions & 2 deletions helm/user_values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,4 @@ nodeService:
irodsPool:
extraArgs:
- --cache_size_max=107374182400
- --cache_root=/irodsfs_pool_cache
- --temp_root=/tmp/irodsfs_pool_temp
- '--cache_timeout_settings=[{"path":"/","timeout":"-1ns","inherit":false},{"path":"/iplant","timeout":"-1ns","inherit":false},{"path":"/iplant/home","timeout":"1h","inherit":false},{"path":"/iplant/home/shared","timeout":"1h","inherit":true}]'
6 changes: 3 additions & 3 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ controllerService:
irodsPlugin:
image:
repository: cyverse/irods-csi-driver
tag: v0.8.7
tag: v0.9.0
pullPolicy: Always

extraArgs:
Expand Down Expand Up @@ -53,7 +53,7 @@ nodeService:
irodsPlugin:
image:
repository: cyverse/irods-csi-driver
tag: v0.8.7
tag: v0.9.0
pullPolicy: Always

extraArgs:
Expand All @@ -68,7 +68,7 @@ nodeService:
irodsPool:
image:
repository: cyverse/irods-csi-driver-pool
tag: v0.8.7
tag: v0.9.0
pullPolicy: Always

extraArgs:
Expand Down
27 changes: 18 additions & 9 deletions pkg/client/irods/irodsfs_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,20 @@ type IRODSFSConfig struct {
GID int `yaml:"gid"`
SystemUser string `yaml:"system_user"`

TempRootPath string `yaml:"temp_root_path,omitempty"`
DataRootPath string `yaml:"data_root_path,omitempty"`

PoolEndpoint string `yaml:"pool_endpoint,omitempty"`
LogPath string `yaml:"log_path,omitempty"`

ReadAheadMax int `yaml:"read_ahead_max"`
OperationTimeout time.Duration `yaml:"operation_timeout"`
PoolEndpoint string `yaml:"pool_endpoint,omitempty"`

ReadAheadMax int `yaml:"read_ahead_max"`
OperationTimeout time.Duration `yaml:"operation_timeout"`
ConnectionLifespan time.Duration `yaml:"connection_lifespan"`
ConnectionIdleTimeout time.Duration `yaml:"connection_idle_timeout"`
ConnectionMax int `yaml:"connection_max"`
MetadataCacheTimeout time.Duration `yaml:"metadata_cache_timeout"`
MetadataCacheCleanupTime time.Duration `yaml:"metadata_cache_cleanup_time"`

LogPath string `yaml:"log_path,omitempty"`
MonitorURL string `yaml:"monitor_url,omitempty"`

Profile bool `yaml:"profile,omitempty"`
Expand All @@ -65,14 +65,22 @@ type IRODSFSConfig struct {
// NewDefaultIRODSFSConfig creates default IRODSFSConfig
func NewDefaultIRODSFSConfig() *IRODSFSConfig {
return &IRODSFSConfig{
Host: "",
Port: PortDefault,
ProxyUser: "",
ClientUser: "",
Zone: "",
Password: "",
Resource: "",
PathMappings: []IRODSFSPathMapping{},
NoPermissionCheck: false,
UID: -1,
GID: -1,
SystemUser: "",

TempRootPath: "",
DataRootPath: "/var/lib/irodsfs",

LogPath: "", // use default

PoolEndpoint: "",

Expand All @@ -84,10 +92,11 @@ func NewDefaultIRODSFSConfig() *IRODSFSConfig {
MetadataCacheTimeout: MetadataCacheTimeoutDefault,
MetadataCacheCleanupTime: MetadataCacheCleanupTimeDefault,

LogPath: "",
MonitorURL: "",
MonitorURL: "",

Profile: false,
ProfileServicePort: 0,
AllowOther: true,

AllowOther: true,
}
}

0 comments on commit 3a03efe

Please sign in to comment.