Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pushing applications with cflinuxfs4 #325

Open
acrmp opened this issue May 2, 2023 · 2 comments
Open

Pushing applications with cflinuxfs4 #325

acrmp opened this issue May 2, 2023 · 2 comments

Comments

@acrmp
Copy link

acrmp commented May 2, 2023

The tile generator is currently hard-coded to push applications specifying the cflinuxfs3 stack if it is available.

function get_stack() {
if $CF stacks 2>&1 | grep "cflinuxfs3" > /dev/null; then
echo >&2 "Using cflinuxfs3 stack"
echo "-s cflinuxfs3"
else
echo >&2 "Using default stack"
fi
}

It would be nice to be able to use cflinuxfs4 when it is available.

Prefer cflinuxfs4

One option would be to do something similar to what currently exists and use cflinuxfs4 if it is available, falling back to
cflinuxfs3. For example:

function get_stack() {
	latest_stack="$($CF stacks | grep 'cflinuxfs' | sort -Vr | head -n1 | awk '{print $1}')"
	if [ -z "$latest_stack" ]; then
		echo >&2 "Using default stack"
	else
		echo >&2 "Using $latest_stack stack"
		echo "-s $latest_stack"
	fi
}

This has some potential to break tiles that don't work on cflinuxfs4, though that could be a good thing if it encourages adoption of cflinuxfs4.

It might also not work if operators were on a version of TAS 3.0 that has cflinuxfs4 but does not have a buildpack with support for cflinuxfs4 that is used when pushing the app.
https://docs.vmware.com/en/VMware-Tanzu-Application-Service/3.0/tas-for-vms/runtime-rn.html#jammy-jellyfish-stack-support-beta-17

Default stack

Another option is to use the configured default stack. This means that the operator would control the stack used, though teams that are shipping tiles may prefer to have their applications use the latest stack that is available.

With the release of TAS 4.0 operators can choose to set cflinuxfs4 as the default stack:
https://docs.vmware.com/en/VMware-Tanzu-Application-Service/4.0/tas-for-vms/runtime-rn.html

Specified by tile developers

Another option would be to allow tile developers to specify the stack that should be used at build time.

@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.

acrmp added a commit to vmware-tanzu/azure-log-analytics-nozzle-release that referenced this issue May 12, 2023
- The tile-generator will currently use cflinuxfs3 if it exists even if
  cflinuxfs4 is the default stack:
  cf-platform-eng/tile-generator#325
- Redefine the get_stack function to prefer cflinuxfs4 if available.
- Only use cflinuxfs4 if the go_buildpack is available. Some
  environments will have the cflinuxfs4 stack but no go_buildpack for
  cflinuxfs4.
acrmp added a commit to vmware-tanzu/azure-log-analytics-nozzle-release that referenced this issue May 16, 2023
- The tile-generator will currently use cflinuxfs3 if it exists even if
  cflinuxfs4 is the default stack:
  cf-platform-eng/tile-generator#325
- Redefine the get_stack function to prefer cflinuxfs4 if available.
- Only use cflinuxfs4 if the go_buildpack is available. Some
  environments will have the cflinuxfs4 stack but no go_buildpack for
  cflinuxfs4.
@peterhaochen47
Copy link

peterhaochen47 commented Aug 30, 2023

+1 on this (on behalf of credhub service broker tile).
Meanwhile, we'll override it just like https://github.com/vmware-tanzu/nozzle-for-microsoft-azure-log-analytics/pull/26/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants