<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[nextflow源码修改及部署]]></title><description><![CDATA[<h2>1. nextflow 详情</h2>
<p dir="auto">版本： 22.10.7<br />
本地地址：<a href="http://192.168.0.135:30080/root/nextflow.git" rel="nofollow ugc">http://192.168.0.135:30080/root/nextflow.git</a></p>
<p dir="auto">代码修改介绍：<br />
K8sTaskHandler.groovy 中208行</p>
<p dir="auto">.withHostMount(k8sConfig.get("hostPath").toString(), k8sConfig.get("hostMountPath").toString)<br />
支持k8s模式下hostpath本地路径；</p>
<h2>2. 部署方式：</h2>
<h3>2.1 docker</h3>
<p dir="auto">nextflow1.conf</p>
<pre><code>docker {
    enabled = true
    runOptions = '-v /ceph_disk2:/ceph_disk2 --network=host --user root'
}
</code></pre>
<p dir="auto">application.yml</p>
<pre><code>server:
  port: 9081
spring:
  redis:
    host: 192.168.1.2
    port: 6379
  datasource:
    url: jdbc:postgresql://192.168.1.2:5435/qiime
    username: postgres
    password: anneng@1235_Jike2015
    driver-class-name: org.postgresql.Driver
mybatis:
  mapper-locations: classpath:mybatis/*.xml
  type-aliases-package: com.anneng.model
nextflow:
  config: /ceph_disk2/app/nextflow/genostack_nextflow_api/config/nextflow1.conf
  weblog-url: http://localhost:9081/nextflow/catchMessage
  dataPath: /ceph_disk2/app/nextflow/genostack_nextflow_api/dag
  workdir: /ceph_disk2/app/nextflow/genostack_nextflow_api/nextflow_workdir
  path: /ceph_disk2/app/nextflow/genostack_nextflow_api/nextflow-22.10.7-all
  phpsource: /ceph_disk2/data/hongyuan/data/source_v3
</code></pre>
<p dir="auto">启动脚本：</p>
<pre><code>docker run -p 9089:9081 -v /usr/bin/docker:/usr/bin/docker -v /var/run/docker.sock:/var/run/docker.sock   -v /ceph_disk2:/ceph_disk2 -v /ceph_disk2/app/nextflow/genostack_nextflow_api/config/application.yml:/application.yml -d dockerhub.genostack.com:8090/library/nextflowapi:v1.91
</code></pre>
<p dir="auto">k8s启动方式：</p>
<p dir="auto">nextflow1.conf</p>
<pre><code>process {
   container = 'quay.io/nextflow/bash'
   executor = 'k8s'
}
k8s {
    namespace = 'default'
    hostPath = '/cephfs_data/'
    hostMountPath = '/cephfs_data/'
}

</code></pre>
<p dir="auto">application.yml</p>
<pre><code>server:
  port: 9081

spring:
  redis:
    host: 192.168.0.135
    port: 30009
  datasource:
    url: jdbc:postgresql://192.168.0.135:30008/qiime
    username: postgres
    password: anneng@1235_Jike2015
    driver-class-name: org.postgresql.Driver

mybatis:
  mapper-locations: classpath:mybatis/*.xml
  type-aliases-package: com.anneng.model

nextflow:
  config: /cephfs_data/genostack_v3/genostack_nextflow_api/config/nextflow1.conf
  weblog-url: http://localhost:9081/nextflow/catchMessage
  dataPath: /cephfs_data/genostack_v3/genostack_nextflow_api/dag
  workdir: /cephfs_data/genostack_v3/genostack_nextflow_api/nextflow_workdir
  path: nextflow
  phpsource: /cephfs_data/genostack_v3/genostack_php/source_v3
</code></pre>
<p dir="auto">部署脚本；<br />
sa.yaml</p>
<pre><code>---
apiVersion: v1
kind: Namespace
metadata:
  name: wave-demo
---
apiVersion: v1
kind: ServiceAccount
metadata:
  namespace: wave-demo
  name: wave-sa
  annotations:
    eks.amazonaws.com/role-arn: "arn:aws:iam::011206878118:role/wave-demo-role" 
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  namespace: wave-demo
  name: wave-role
rules:
  - apiGroups: [""]
    resources: ["pods", "pods/status", "pods/log", "pods/exec"]
    verbs: ["get", "list", "watch", "create", "delete"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  namespace: wave-demo
  name: wave-rolebind
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: wave-role
subjects:
  - kind: ServiceAccount
    name: wave-sa
</code></pre>
<p dir="auto">nextflow.yaml</p>
<pre><code>---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nextflow
  labels:
    app: nextflow
    layer: backend
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nextflow
  template:
    metadata:
      labels:
        app: nextflow
    spec:
      serviceAccountName: wave-sa
      serviceAccount: wave-sa
      containers:             
        - name: nextflow
          image: dockerhub.genostack.com:8090/library/nextflowapi:v1.91
          ports:
            - containerPort: 9081
          volumeMounts:                                #容器内挂载点的定义部分
          - name: data                            #容器内挂载点名称
            subPath: genostack_v3/genostack_nextflow_api/config/application.yml
            mountPath: /application.yml
          - name: data
            mountPath: /cephfs_data
      volumes:                                             #本地需要挂载到容器里的数据卷定义部分
        - name: data
          hostPath:
            path: /cephfs_data
---
kind: Service
apiVersion: v1
metadata:
  name: nextflow
  labels:
    app: nextflow
    layer: backend
spec:
  type: ClusterIP
  selector:
    app: nextflow
  ports:
    - port: 9081
      targetPort: 9081

</code></pre>
]]></description><link>http://an.forum.genostack.com/topic/933/nextflow源码修改及部署</link><generator>RSS for Node</generator><lastBuildDate>Sat, 13 Jun 2026 09:37:42 GMT</lastBuildDate><atom:link href="http://an.forum.genostack.com/topic/933.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 28 Jun 2023 09:33:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to nextflow源码修改及部署 on Thu, 18 Jan 2024 05:33:21 GMT]]></title><description><![CDATA[<p dir="auto">配置文件的优先级<br />
Selector priority</p>
<p dir="auto">When mixing generic process configuration and selectors the following priority rules are applied (from lower to higher):</p>
<p dir="auto">Process generic configuration.</p>
<p dir="auto">Process specific directive defined in the workflow script.</p>
<p dir="auto">withLabel selector definition.</p>
<p dir="auto">withName selector definition.</p>
]]></description><link>http://an.forum.genostack.com/post/2443</link><guid isPermaLink="true">http://an.forum.genostack.com/post/2443</guid><dc:creator><![CDATA[anneng]]></dc:creator><pubDate>Thu, 18 Jan 2024 05:33:21 GMT</pubDate></item></channel></rss>