diff --git a/README.md b/README.md index 3bdf435..4192fee 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ Here `selector` can be either a service (like `storagenode`) or a name of a serv After running `storj-up init`, you can use the following command to replace binaries based on a specific Gerrit changeset: ``` -storj-up build remote gerrit -f refs/changes/65/6365/1 satellite-api satellite-core satellite-admin uplink versioncontrol +storj-up build remote gerrit -f refs/changes/65/6365/1 satellite-api satellite-core satellite-admin uplink ``` You will need to change `refs/changes/65/6365/1` to the Gerrit patchset you want to use, and change the binaries that follow it based on what you are trying to replace. diff --git a/cmd/testdata/docker-compose.yaml b/cmd/testdata/docker-compose.yaml index d1c049d..5df2565 100644 --- a/cmd/testdata/docker-compose.yaml +++ b/cmd/testdata/docker-compose.yaml @@ -246,7 +246,7 @@ services: STORJ_STORAGE2_MONITOR_MINIMUM_DISK_SPACE: "0" STORJ_STORAGE2_TRUST_SOURCES: 12whfK1EDvHJtajBiAUeajQLYcWqxcQmdYQU5zX5cCf6bAxfgu4@satellite-api:7777 STORJ_STORAGE_ALLOCATED_DISK_SPACE: 1G - STORJ_VERSION_SERVER_ADDRESS: http://versioncontrol:8080/ + STORJ_VERSION_SERVER_ADDRESS: http://versioncontrol.invalid:8080 STORJ_WAIT_FOR_SATELLITE: "true" image: img.dev.storj.io/storjup/storj:1.64.1 networks: @@ -272,8 +272,6 @@ services: BINARY_STORAGENODE_UPDATER_ROLLOUT_SEED: "0000000000000000000000000000000000000000000000000000000000000001" BINARY_UPLINK_ROLLOUT_SEED: "0000000000000000000000000000000000000000000000000000000000000001" DEFAULTS: dev - STORJUP_AUTHSERVICE: http://authservice:8888 - STORJUP_SATELLITE: satellite-api STORJ_DEBUG_ADDR: 0.0.0.0:11111 STORJ_DEFAULTS: dev STORJ_LOG_LEVEL: debug diff --git a/pkg/common/compose_test.go b/pkg/common/compose_test.go index 4cffc8e..c1544eb 100644 --- a/pkg/common/compose_test.go +++ b/pkg/common/compose_test.go @@ -12,7 +12,7 @@ import ( func Test_ResolveService(t *testing.T) { services, err := ResolveServices([]string{"minimal", "db"}) require.NoError(t, err) - expected := []string{"cockroach", "redis", "satellite-api", "storagenode", "versioncontrol"} + expected := []string{"cockroach", "redis", "satellite-api", "storagenode"} require.ElementsMatch(t, expected, services) diff --git a/pkg/files/templates/docker-compose.template.yaml b/pkg/files/templates/docker-compose.template.yaml index 2717f4d..f1ed59f 100644 --- a/pkg/files/templates/docker-compose.template.yaml +++ b/pkg/files/templates/docker-compose.template.yaml @@ -174,6 +174,7 @@ services: STORJ_PAYMENTS_STORJSCAN_AUTH_SECRET: us1secret STORJ_PAYMENTS_STORJSCAN_DISABLE_LOOP: "false" STORJ_PAYMENTS_STORJSCAN_ENDPOINT: http://storjscan:12000 + STORJ_VERSION_SERVER_ADDRESS: http://versioncontrol.invalid:8080/ STORJUP_ROLE: satellite-admin STORJ_WAIT_FOR_SATELLITE: "true" STORJUP_SATELLITE: satellite-api @@ -226,6 +227,7 @@ services: STORJ_SERVER_EXTENSIONS_REVOCATION: "false" STORJ_SERVER_REVOCATION_DBURL: redis://redis:6379?db=1 STORJ_SERVER_USE_PEER_CA_WHITELIST: "false" + STORJ_VERSION_SERVER_ADDRESS: http://versioncontrol.invalid:8080/ STORJ_WAIT_FOR_DB: "true" STORJUP_SATELLITE: satellite-api STORJUP_AUTHSERVICE: http://authservice:8888 @@ -265,6 +267,7 @@ services: STORJ_PAYMENTS_STORJSCAN_AUTH_SECRET: us1secret STORJ_PAYMENTS_STORJSCAN_DISABLE_LOOP: "false" STORJ_PAYMENTS_STORJSCAN_ENDPOINT: http://storjscan:12000 + STORJ_VERSION_SERVER_ADDRESS: http://versioncontrol.invalid:8080/ STORJUP_ROLE: satellite-core STORJ_WAIT_FOR_SATELLITE: "true" STORJUP_SATELLITE: satellite-api @@ -294,7 +297,7 @@ services: STORJ_STORAGE2_MONITOR_MINIMUM_DISK_SPACE: "0" STORJ_STORAGE2_TRUST_SOURCES: 12whfK1EDvHJtajBiAUeajQLYcWqxcQmdYQU5zX5cCf6bAxfgu4@satellite-api:7777 STORJ_STORAGE_ALLOCATED_DISK_SPACE: 1G - STORJ_VERSION_SERVER_ADDRESS: http://versioncontrol:8080/ + STORJ_VERSION_SERVER_ADDRESS: http://versioncontrol.invalid:8080/ STORJ_WAIT_FOR_SATELLITE: "true" STORJUP_SATELLITE: satellite-api STORJUP_AUTHSERVICE: http://authservice:8888 @@ -331,32 +334,6 @@ services: image: img.dev.storj.io/storjup/storj:1.62.4 networks: default: null - versioncontrol: - command: - - versioncontrol - - run - environment: - BINARY_GATEWAY_ROLLOUT_SEED: "0000000000000000000000000000000000000000000000000000000000000001" - BINARY_IDENTITY_ROLLOUT_SEED: "0000000000000000000000000000000000000000000000000000000000000001" - BINARY_SATELLITE_ROLLOUT_SEED: "0000000000000000000000000000000000000000000000000000000000000001" - BINARY_STORAGENODE_ROLLOUT_SEED: "0000000000000000000000000000000000000000000000000000000000000001" - BINARY_STORAGENODE_UPDATER_ROLLOUT_SEED: "0000000000000000000000000000000000000000000000000000000000000001" - BINARY_UPLINK_ROLLOUT_SEED: "0000000000000000000000000000000000000000000000000000000000000001" - DEFAULTS: dev - STORJ_DEBUG_ADDR: 0.0.0.0:11111 - STORJ_DEFAULTS: dev - STORJ_LOG_LEVEL: debug - STORJ_METRICS_APP_SUFFIX: sim - STORJUP_SATELLITE: satellite-api - STORJUP_AUTHSERVICE: http://authservice:8888 - image: img.dev.storj.io/storjup/storj:1.62.4 - networks: - default: null - ports: - - mode: ingress - target: 8080 - published: 7070 - protocol: tcp prometheus: image: prom/prometheus volumes: diff --git a/pkg/recipe/minimal.yaml b/pkg/recipe/minimal.yaml index ac3c40e..11498c9 100644 --- a/pkg/recipe/minimal.yaml +++ b/pkg/recipe/minimal.yaml @@ -1,30 +1,6 @@ name: minimal -description: "The absolute minimal services to persist a file: satellite-api, storagenodes and versioncontrol" +description: "The absolute minimal services to persist a file: satellite-api and storagenodes" add: - - name: versioncontrol - label: - - storj - - versioncontrol - image: img.dev.storj.io/storjup/storj:1.104.5 - command: - - versioncontrol - - run - persistence: - - /var/lib/storj/.local/share/storj - config: - BINARY_GATEWAY_ROLLOUT_SEED: "0000000000000000000000000000000000000000000000000000000000000001" - BINARY_IDENTITY_ROLLOUT_SEED: "0000000000000000000000000000000000000000000000000000000000000001" - BINARY_SATELLITE_ROLLOUT_SEED: "0000000000000000000000000000000000000000000000000000000000000001" - BINARY_STORAGENODE_ROLLOUT_SEED: "0000000000000000000000000000000000000000000000000000000000000001" - BINARY_STORAGENODE_UPDATER_ROLLOUT_SEED: "0000000000000000000000000000000000000000000000000000000000000001" - BINARY_UPLINK_ROLLOUT_SEED: "0000000000000000000000000000000000000000000000000000000000000001" - - STORJ_LOG_LEVEL: debug - STORJ_METRICS_APP_SUFFIX: sim - STORJ_ADDRESS: '{{ Host .This "listen" }}:{{ Port .This "public" }}' - STORJ_DEBUG_ADDR: '{{ Host .This "listen" }}:{{ Port .This "debug" }}' - environment: - STORJ_DEFAULTS: dev - name: satellite-api label: - storj diff --git a/pkg/recipe/versioncontrol.yaml b/pkg/recipe/versioncontrol.yaml new file mode 100644 index 0000000..d781ff0 --- /dev/null +++ b/pkg/recipe/versioncontrol.yaml @@ -0,0 +1,27 @@ +name: versioncontrol +description: "version control service" +add: + - name: versioncontrol + label: + - storj + - versioncontrol + image: img.dev.storj.io/storjup/storj:1.104.5 + command: + - versioncontrol + - run + persistence: + - /var/lib/storj/.local/share/storj + config: + BINARY_GATEWAY_ROLLOUT_SEED: "0000000000000000000000000000000000000000000000000000000000000001" + BINARY_IDENTITY_ROLLOUT_SEED: "0000000000000000000000000000000000000000000000000000000000000001" + BINARY_SATELLITE_ROLLOUT_SEED: "0000000000000000000000000000000000000000000000000000000000000001" + BINARY_STORAGENODE_ROLLOUT_SEED: "0000000000000000000000000000000000000000000000000000000000000001" + BINARY_STORAGENODE_UPDATER_ROLLOUT_SEED: "0000000000000000000000000000000000000000000000000000000000000001" + BINARY_UPLINK_ROLLOUT_SEED: "0000000000000000000000000000000000000000000000000000000000000001" + + STORJ_LOG_LEVEL: debug + STORJ_METRICS_APP_SUFFIX: sim + STORJ_ADDRESS: '{{ Host .This "listen" }}:{{ Port .This "public" }}' + STORJ_DEBUG_ADDR: '{{ Host .This "listen" }}:{{ Port .This "debug" }}' + environment: + STORJ_DEFAULTS: dev \ No newline at end of file diff --git a/pkg/runtime/compose/compose.go b/pkg/runtime/compose/compose.go index 1cac780..15b76db 100644 --- a/pkg/runtime/compose/compose.go +++ b/pkg/runtime/compose/compose.go @@ -140,6 +140,10 @@ func (c *Compose) GetPort(service runtime.ServiceInstance, portType string) runt if portType == "console" { return runtime.PortMap{Internal: 8080, External: 9080, Protocol: "tcp"} } + case "versioncontrol": + if portType == "public" { + return runtime.PortMap{Internal: 8080, External: 8080, Protocol: "tcp"} + } } return runtime.PortMap{Internal: -1, External: -1, Protocol: "tcp"}