0
votes

Since I have used GitLab package registery as remote maven repository for a while, I'd like to use this for deployment in spring cloud dataflow server.

To use GitLab package registery, local maven setting has server section with wagon httpHeaders properties:

    <server>
      <id>gitlab-maven</id>
      <configuration>
        <httpHeaders>
          <property>
            <name>Deploy-Token</name>
            <value>DEMO_TOKEN</value>
          </property>
        </httpHeaders>
      </configuration>
    </server>
  </servers>
</settings>

I have tried to added remote maven repo to dataflow server in docker-compose dataflow server's environment (tried also this for both dataflow server and skipper) :

  dataflow-server:
    image: springcloud/spring-cloud-dataflow-server:${DATAFLOW_VERSION:?DATAFLOW_VERSION is not set!}
    container_name: dataflow-server
    ports:
      - "9393:9393"
    environment:
       ...
      - maven.remote-repositories.gitlab1.url=GitLab repo
      - maven.remote-repositories.gitlab1.auth.username=Deploy-Token
      - maven.remote-repositories.gitlab1.auth.password=DEMO_TOKEN

It didn't work and gave error message:

dataflow-server | java.lang.IllegalStateException: Failed to resolve MavenResource: com.example:processor:jar:0.0.1-SNAPSHOT. Configured remote repositories: : [gitlab1],[springRepo]

it looks like dataflow server has tried GitLab repository "gitlab1" but failed. I am not sure if this is a problem of tokens or credentials or some other configurations.

Is there some one who can share the experience about using GitLab deploy-token from Dataflow server to access artifacts? Much thanks for any help.

cheers.

update:

I have also tried this solution https://docs.spring.io/spring-cloud-dataflow/docs/current/reference/htmlsingle/#_wagon for dataflow.

 gitlab4:
        url: gitLabURL
        wagon:
          http:
            all:
              use-preemptive: true
        auth:
            username: Deploy-Token
            password: DEMO_TOKEN

It didn't work. still trying.

update 2:

I have applied last solution also for skipper and now it looks like wokring. I will update when I comfirm this.

1

1 Answers

0
votes

Yes, You need to apply the maven repo configuration for both the SCDF and the Skipper server.

SCDF server requires maven config:

  • to download the app metadata for both the stream/task apps
  • to download the task app when launching (in case of local deployer) and also set the appropriate maven config for the deployers (CloudFoundry)

Skipper server requires maven config:

  • to download the stream apps (for local deployer)
  • to set the maven config for CF deployer

Depending on which deployer setup you choose, you need to configure maven repo configs on either or both the SCDF/Skipper servers.