kc9wwh / macOSUpgrade

Workflow for doing in-place upgrades.
Other
418 stars 103 forks source link

automated re-enrollment support with --installpackage #119

Open cubandave opened 5 years ago

cubandave commented 5 years ago

Hey kc9wwh,

I've made a new tool to automate re-enrollment for not DEP devices when using your script.

Would be super cool to put code into your master. Check it out. I sent you a video on slack as a ealry demo. I'll make a video demo tomorrow.

https://github.com/cubandave/re-enroll-mac-into-jamf-after-wipe

cubandave commented 5 years ago

I've now fully validated my own code with Travis CI. Including my own Project. That thing is awesome!

kenchan0130 commented 5 years ago

Hi @cubandave, Thank you for your contribution.

It seems that your patches strongly depend on re-enroll-mac-into-jamf-after-wipe.

This project is focused on upgrading only. However, I am aware that this project is poorly extensible.

I think that it is possible to apply changes that accepts a package path to a jamf script argument like https://github.com/kc9wwh/macOSUpgrade/pull/110. In doing so, I would say each processes will be loosely coupled.

kenchan0130 commented 5 years ago

@taniguti There is also about this, so how about adding another PR that changes the path of package to pass to the argument 10 of jamf script?

ryangball commented 5 years ago

If this end result of enrollment was desired, this would accomplish the same goal:

# Create required directories
mkdir -p /usr/local/jamf/bin /usr/local/bin

# Move the jamf binary
mv /tmp/jamf /usr/local/jamf/bin

# Make the jamf binary executable
chmod +x /usr/local/jamf/bin/jamf

# Create a symbolic link
ln -s /usr/local/jamf/bin/jamf /usr/local/bin

# Create a configuration file
jamf createConf -k -url enrollmentURL

# Enroll the computer
jamf enroll -invitation invitationID
cubandave commented 5 years ago

Hey @kenchan0130 I can make the changes to only have it installPackage with a parameter from $10. I’ll re work the re-enroll project to make it create the package first and put the package in a static location.

@ryangball that’s exactly how the re-enroll project does that.

taniguti commented 5 years ago

I agree with @kenchan0130 . To use $10 for additional package for erase option sounds good.

cubandave commented 5 years ago

Cool. I’ll make a new pull request soon with that setup. Error checking and all.

kenchan0130 commented 5 years ago

@cubandave I am trying to do actions at https://github.com/kc9wwh/macOSUpgrade/pull/121 and https://github.com/kc9wwh/macOSUpgrade/pull/122.