Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purpleidea-puppetmatlab
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Rane Squires
purpleidea-puppetmatlab
Commits
ce205ac7
Commit
ce205ac7
authored
Jun 20, 2019
by
Rane Squires
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove install class from init
parent
ac12a692
Pipeline
#28
canceled with stages
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
106 deletions
+0
-106
manifests/init.pp
manifests/init.pp
+0
-106
No files found.
manifests/init.pp
View file @
ce205ac7
...
@@ -17,112 +17,6 @@
...
@@ -17,112 +17,6 @@
# TODO: add a matlab-$name.sh file in /etc/profile.d/ to add the matlab bin to path
# TODO: add a matlab-$name.sh file in /etc/profile.d/ to add the matlab bin to path
define
matlab::install
(
# $namevar matlab release version
$iso
,
# matlab iso for installation
$licensekey
,
# format: #####-#####-#####-#####
$licensefile
,
# license.lic as provided by mathworks
$licenseagree
=
false
,
# do you agree to license, true/false ?
$prefix
=
'/usr/local'
# install prefix
)
{
include
'matlab'
include
matlab::vardir
#$vardir = $::matlab::vardir::module_vardir # with trailing slash
$vardir
=
regsubst
(
$::matlab::vardir::module_vardir
,
'\/$'
,
''
)
$install_destination
=
"
${prefix}
/MATLAB/
${name}
"
# does user accept license ?
$agree
=
$licenseagree
?
{
true
=>
'yes'
,
default
=>
'no'
,
}
# make folder to mount on
file
{
"/mnt/matlab-
${name}
"
:
ensure
=>
directory
,
# make sure this is a directory
recurse
=>
false
,
# don't manage directory
purge
=>
false
,
# don't purge unmanaged files
force
=>
false
,
# don't purge subdirs and links
owner
=>
root
,
group
=>
root
,
mode
=>
'0555'
,
# default for iso mounts
backup
=>
false
,
# don't backup to filebucket
}
# get iso to mount
# TODO: since there seem to be different iso's for each version, maybe
# we should add a unique identifier based on the $iso variable here.
file
{
"
${vardir}
/MATHWORKS-
${name}
.iso"
:
ensure
=>
present
,
owner
=>
root
,
group
=>
nobody
,
mode
=>
'0600'
,
# u=rw,go=
backup
=>
false
,
# don't backup to filebucket!
source
=>
$iso
,
alias
=>
"matlab_iso.
${name}
"
,
require
=>
File
[
"/mnt/matlab-
${name}
"
],
}
# mount!
# TODO: replace this mount with an exec that has an:
# onlyif => the_binary_is_not_installed so that a normal machine
# doesn't need to have the iso mounted all the time...
mount
{
"/mnt/matlab-
${name}
"
:
ensure
=>
mounted
,
atboot
=>
true
,
device
=>
"
${vardir}
/MATHWORKS-
${name}
.iso"
,
fstype
=>
'iso9660'
,
options
=>
'loop,ro'
,
dump
=>
'0'
,
# fs_freq: 0 to skip file system dumps
pass
=>
'0'
,
# fs_passno: 0 to skip fsck on boot
alias
=>
"matlab_mount.
${name}
"
,
require
=>
[
File
[
"matlab_iso.
${name}
"
]],
}
# build installer parameters file in our scratch directory
file
{
"
${vardir}
/installer_input.txt.
${name}
"
:
ensure
=>
present
,
owner
=>
root
,
group
=>
nobody
,
mode
=>
'0600'
,
# u=rw,go=r
require
=>
Mount
[
"matlab_mount.
${name}
"
],
content
=>
template
(
'matlab/installer_input.txt.erb'
),
alias
=>
"matlab_input.
${name}
"
,
}
# install matlab
exec
{
"/mnt/matlab-
${name}
/install -inputFile
${vardir}
/installer_input.txt.
${name}
"
:
logoutput
=>
on_failure
,
creates
=>
$install_destination
,
# when this folder appears, we assume it got installed
require
=>
File
[
"matlab_input.
${name}
"
],
alias
=>
"matlab_install.
${name}
"
,
}
# create 'licenses' directory
file
{
"
${install_destination}
/licenses/"
:
ensure
=>
directory
,
# make sure this is a directory
recurse
=>
true
,
# recursively manage directory
purge
=>
true
,
# purge all unmanaged files
force
=>
true
,
# also purge subdirs and links
owner
=>
root
,
group
=>
root
,
mode
=>
'0644'
,
backup
=>
false
,
# don't backup to filebucket
require
=>
Exec
[
"matlab_install.
${name}
"
],
}
# copy over license file to activate
file
{
"
${install_destination}
/licenses/license.lic"
:
ensure
=>
present
,
owner
=>
root
,
group
=>
nobody
,
# TODO: is there a worry that someone will steal the license ?
mode
=>
'0644'
,
# u=rw,g=r,o=r
source
=>
$licensefile
,
require
=>
File
[
"
${install_destination}
/licenses/"
],
}
}
class
matlab
()
{
class
matlab
()
{
# dependencies for matlab to work
# dependencies for matlab to work
package
{[
'libXp'
,
'libXt'
,
'libXpm'
,
'libXmu'
]:
package
{[
'libXp'
,
'libXt'
,
'libXpm'
,
'libXmu'
]:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment