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

Offline Porter Installation #3210

Merged
merged 18 commits into from
Sep 24, 2024
Merged

Conversation

jmcudd
Copy link
Contributor

@jmcudd jmcudd commented Aug 20, 2024

What does this change

The new bundle-linux.sh script automates the creation of a tarball containing all the necessary artifacts for installing the Porter CLI, including the MongoDB Docker image and the Porter installation files. It pulls a specific version of the MongoDB image and packages all the downloaded assets into a compressed tarball, providing clear instructions for extracting the bundle and executing the installation script. This makes it easy for users to set up Porter in air-gapped environments.

The install-linux.sh script has been updated to local or remote binaries, to facilitate an offline installation. This is accomplished by setting the PORTER_BINARY_URL to a file://<absolute-path-to-linux-binary> instead of the Porter CDN.

What issue does it fix

Closes #3198

Notes for the reviewer

This PR directly addresses feedback about complexity of the installation script in PR #3205

The bundle-linux.sh script pulls the latest version of the install-linux.sh from the CDN, so when testing you will need to replace the downloaded install-linux.sh file with the one from this branch. Use the following command.

cd scripts/bundle/
PORTER_SCRIPT_URL="file://$(realpath ../install/install-linux.sh)" bash bundle-linux.sh

Checklist

  • Did you write tests?
  • Did you write documentation?
  • Did you change porter.yaml or a storage document record? Update the corresponding schema file.
  • If this is your first pull request, please add your name to the bottom of our Contributors list. Thank you for making Porter better! 🙇‍♀️

@jmcudd jmcudd force-pushed the bundle-script-improved branch 2 times, most recently from 7f5cbc0 to 02c098f Compare August 20, 2024 12:54
@jmcudd
Copy link
Contributor Author

jmcudd commented Aug 20, 2024

@kichristensen I took your feedback, in PR #3205, about the added complexity in the install script and came up with an alternative that keeps things fairly simple.

One thing to note about this is it doesn't solve installation of mixins, I'm not sure how that would be solved.

@kichristensen
Copy link
Contributor

@jmcudd Thanks for the PR, I will do some testing locally tomorrow and get back to you. But overall I like it

@kichristensen
Copy link
Contributor

@kichristensen I took your feedback, in PR #3205, about the added complexity in the install script and came up with an alternative that keeps things fairly simple.

One thing to note about this is it doesn't solve installation of mixins, I'm not sure how that would be solved.

Could you update the documentation with a note, saying the mixins aren't handled by the script? Just to make it clear for users that mixins aren't currently handled

@kichristensen
Copy link
Contributor

I also think it would make a lot if sense to add the script to the release just like we do with install-linux.sh (https://github.com/getporter/porter/blob/main/magefile.go#L491), and adding the Netlify redirect (like this one https://github.com/getporter/porter/blob/main/docs/static/_redirects#L64). That would allows to have the script versioned like the rest of the installation scripts.

@jmcudd jmcudd force-pushed the bundle-script-improved branch from 585b601 to 58ba090 Compare August 24, 2024 01:35
@jmcudd
Copy link
Contributor Author

jmcudd commented Aug 24, 2024

Here is what I've addressed in my latest changes:

  • Added note in docs about mixins not being included in the bundle
  • Updated release to include the bundle-linux.sh script and update the PORTER_VERSION with sed
  • Updated netlify to do the redirects

@schristoff schristoff added the docs Markdown ahoy! Updates needed on porter.sh or in dev docs. label Sep 19, 2024
@schristoff
Copy link
Member

This looks great, aside from Kim's documentation request. Thank you :)

@jmcudd
Copy link
Contributor Author

jmcudd commented Sep 19, 2024

I'll try to find some time this week to make the requested additions to the documentation.

jmcudd and others added 11 commits September 20, 2024 23:34
Signed-off-by: John Cudd <jmcudd@gmail.com>
Signed-off-by: John Cudd <jmcudd@gmail.com>
Signed-off-by: John Cudd <jmcudd@gmail.com>
Signed-off-by: John Cudd <jmcudd@gmail.com>
Signed-off-by: John Cudd <jmcudd@gmail.com>
Signed-off-by: John Cudd <jmcudd@gmail.com>
Signed-off-by: John Cudd <jmcudd@gmail.com>
Signed-off-by: John Cudd <jmcudd@gmail.com>
)

We should not require all secret plugins to call the host secrets plugin
for non secret values. Instead we should call the host secrets plugin
directly.

Signed-off-by: Kim Christensen <kimworking@gmail.com>
Co-authored-by: schristoff <28318173+schristoff@users.noreply.github.com>
Signed-off-by: John Cudd <jmcudd@gmail.com>
* add doc for AKS integration

Signed-off-by: dejanualex <dejanualexandru@gmail.com>

* remove merge action and outputs

Signed-off-by: dejanualex <dejanualexandru@gmail.com>

---------

Signed-off-by: dejanualex <dejanualexandru@gmail.com>
Co-authored-by: Kim Christensen <2461567+kichristensen@users.noreply.github.com>
Signed-off-by: John Cudd <jmcudd@gmail.com>
)

* Do not reference CNAB invocation images

As CNAB is an implementation detail as this point, we no longer want
to use the term 'invocation image'. Instead we should use the term
'bundle image'.
This PR ensures that the current references to 'invocation image' is
changed to 'bundle image'.

Signed-off-by: Kim Christensen <kimworking@gmail.com>

---------

Signed-off-by: Kim Christensen <kimworking@gmail.com>
Co-authored-by: schristoff <28318173+schristoff@users.noreply.github.com>
Signed-off-by: John Cudd <jmcudd@gmail.com>
dependabot bot and others added 5 commits September 20, 2024 23:34
…ows in the github_actions group across 1 directory (getporter#3217)

Bump actions/download-artifact

Bumps the github_actions group with 1 update in the /.github/workflows directory: [actions/download-artifact](https://github.com/actions/download-artifact).

Updates `actions/download-artifact` from 3.0.1 to 4.1.7
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v3.0.1...v4.1.7)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  dependency-group: github_actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: John Cudd <jmcudd@gmail.com>
fix: Update upload-artifact action version

Signed-off-by: Kim Christensen <kimworking@gmail.com>
Signed-off-by: John Cudd <jmcudd@gmail.com>
fix: Correct the Cosign links that have stopped working

Signed-off-by: Kim Christensen <kimworking@gmail.com>
Co-authored-by: schristoff <28318173+schristoff@users.noreply.github.com>
Signed-off-by: John Cudd <jmcudd@gmail.com>
…rter#3213)

fix: Upgrade should not be allowed if installation is not installed

Signed-off-by: Kim Christensen <kimworking@gmail.com>
Signed-off-by: John Cudd <jmcudd@gmail.com>
Also removed echo from the extraction instructions.

Signed-off-by: John Cudd <jmcudd@gmail.com>
@jmcudd jmcudd force-pushed the bundle-script-improved branch from 9361649 to 1079b5a Compare September 21, 2024 03:35
@kichristensen kichristensen merged commit 28abae5 into getporter:main Sep 24, 2024
38 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Markdown ahoy! Updates needed on porter.sh or in dev docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Offline Environment Error: Unable to Pull Mongo Image in Porter v1.1.0
4 participants