Skip to content

Commit c74cd32

Browse files
committed
Rename allow_package_installation to disable_package_installation
1 parent 49f2149 commit c74cd32

21 files changed

+113
-116
lines changed

docs/DISCONNECTED_INSTALL.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ You must have a private Docker Registry to perform a disconnected install -- if
88

99
There are two options in a Plan file that control disconnected installs:
1010

11-
**allow_package_installation**: If you want to install your own packages, set this flag to **false**. Not only will Kismatic NOT install packages for you, it will enforce that they have been installed correctly before attempting to install or upgrade Kubernetes.
11+
**disable_package_installation**: If you want to install your own packages, set this flag to **true**. Not only will Kismatic NOT install packages for you, it will enforce that they have been installed correctly before attempting to install or upgrade Kubernetes.
1212

1313
**disconnected_install**: If you maintain your own docker registry, setting this flag to **true** will cause Kismatic to load all of the docker images needed to install Kubernetes into the registry. When this flag is set to true, all required kismatic packages must be either already installed or the URLs of cloned yum/deb repositories must be provided in the **package_repository_urls** field. When **package_repository_urls** is set, these repositories will be automatically configured on the nodes and used during the install.
1414

1515
... | connected install | disconnected install
1616
--- | --- | ---
17-
**allow package installation** | Most users will want this. Kismatic is fully automates and will download and install packages and docker images from public sources. This is likely the best option if you have internet access to your nodes and a wide pipe. | In this case, packages may be downloaded from the internet, but docker images will be downloaded once and installed in a docker registry that will feed your nodes.
18-
**disallow package installation** | This is the option to choose if you do not want Kismatic to install any packages, but don't have an on-site docker registry. | In this case, you will be installing your own packages and synchronizing docker images with a local docker registry.
17+
**enable package installation** | Most users will want this. Kismatic is fully automates and will download and install packages and docker images from public sources. This is likely the best option if you have internet access to your nodes and a wide pipe. | In this case, packages may be downloaded from the internet, but docker images will be downloaded once and installed in a docker registry that will feed your nodes.
18+
**disable package installation** | This is the option to choose if you do not want Kismatic to install any packages, but don't have an on-site docker registry. | In this case, you will be installing your own packages and synchronizing docker images with a local docker registry.

docs/PACKAGES.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ One way to ensure you've correctly synchronized your repo is to install a test c
5959
1. Provision 1 node of each role
6060
2. Install the Kismatic packages
6161
3. Run `kismatic plan` to generate a new Plan file
62-
4. Update the Plan file to identify your nodes and using the configuration `allow_package_installation=false`.
62+
4. Update the Plan file to identify your nodes and using the configuration `disable_package_installation=true`.
6363
5. Run `kismatic validate`
6464
6. During validation, the Kismatic inspector will check your packages to be sure they installed correctly and will fail if any of them are missing.
6565

integration/disconnected_install_test.go

+9-9
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ var _ = Describe("disconnected install feature", func() {
4343

4444
By("Running kismatic install apply")
4545
installOpts := installOptions{
46-
allowPackageInstallation: false,
46+
disablePackageInstallation: true,
4747
disconnectedInstallation: true,
4848
modifyHostsFiles: true,
4949
autoConfigureDockerRegistry: true,
@@ -79,14 +79,14 @@ var _ = Describe("disconnected install feature", func() {
7979
err = disableInternetAccess(nodes.allNodes(), sshKey)
8080
FailIfError(err, "Failed to create iptable rule")
8181

82-
// disallowRegistrySeeding = false, run step to seed
82+
// disableRegistrySeeding = false, run step to seed
8383
installOpts := installOptions{
84-
allowPackageInstallation: false,
85-
disconnectedInstallation: true,
86-
modifyHostsFiles: true,
87-
dockerRegistryCAPath: caFile,
88-
dockerRegistryIP: nodes.etcd[0].PrivateIP,
89-
dockerRegistryPort: dockerRegistryPort,
84+
disablePackageInstallation: true,
85+
disconnectedInstallation: true,
86+
modifyHostsFiles: true,
87+
dockerRegistryCAPath: caFile,
88+
dockerRegistryIP: nodes.etcd[0].PrivateIP,
89+
dockerRegistryPort: dockerRegistryPort,
9090
}
9191
By("Seeding images")
9292
writePlanFile(buildPlan(nodes, installOpts, sshKey))
@@ -96,7 +96,7 @@ var _ = Describe("disconnected install feature", func() {
9696
err = c.Run()
9797
Expect(err).ToNot(HaveOccurred())
9898

99-
installOpts.disallowRegistrySeeding = true
99+
installOpts.disableRegistrySeeding = true
100100
By("Running kismatic install apply")
101101
err = installKismatic(nodes, installOpts, sshKey)
102102
Expect(err).ToNot(HaveOccurred())

integration/docker_registry_test.go

+3-5
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ var _ = Describe("kismatic docker registry feature", func() {
1717
ItOnAWS("should install successfully [slow]", func(aws infrastructureProvisioner) {
1818
WithInfrastructure(NodeCount{1, 1, 1, 0, 0}, Ubuntu1604LTS, aws, func(nodes provisionedNodes, sshKey string) {
1919
opts := installOptions{
20-
allowPackageInstallation: true,
2120
autoConfigureDockerRegistry: true,
2221
}
2322
err := installKismatic(nodes, opts, sshKey)
@@ -34,10 +33,9 @@ var _ = Describe("kismatic docker registry feature", func() {
3433
caFile, err := deployDockerRegistry(nodes.etcd[0], dockerRegistryPort, sshKey)
3534
Expect(err).ToNot(HaveOccurred())
3635
installOpts := installOptions{
37-
allowPackageInstallation: true,
38-
dockerRegistryCAPath: caFile,
39-
dockerRegistryIP: nodes.etcd[0].PrivateIP,
40-
dockerRegistryPort: dockerRegistryPort,
36+
dockerRegistryCAPath: caFile,
37+
dockerRegistryIP: nodes.etcd[0].PrivateIP,
38+
dockerRegistryPort: dockerRegistryPort,
4139
}
4240
err = installKismatic(nodes, installOpts, sshKey)
4341
Expect(err).ToNot(HaveOccurred())

integration/hosts_file_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ var _ = Describe("hosts file modification feature", func() {
3131
}
3232

3333
plan := PlanAWS{
34-
AllowPackageInstallation: true,
3534
Etcd: nodes.etcd,
3635
Master: nodes.master,
3736
MasterNodeFQDN: loadBalancedFQDN,

integration/install.go

+14-15
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ func GetSSHKeyFile() (string, error) {
2929
}
3030

3131
type installOptions struct {
32-
allowPackageInstallation bool
32+
disablePackageInstallation bool
3333
disconnectedInstallation bool
34-
disallowRegistrySeeding bool
34+
disableRegistrySeeding bool
3535
autoConfigureDockerRegistry bool
3636
dockerRegistryIP string
3737
dockerRegistryPort int
@@ -46,16 +46,15 @@ type installOptions struct {
4646
func installKismaticMini(node NodeDeets, sshKey string) error {
4747
sshUser := node.SSHUser
4848
plan := PlanAWS{
49-
Etcd: []NodeDeets{node},
50-
Master: []NodeDeets{node},
51-
Worker: []NodeDeets{node},
52-
Ingress: []NodeDeets{node},
53-
Storage: []NodeDeets{node},
54-
MasterNodeFQDN: node.PublicIP,
55-
MasterNodeShortName: node.PublicIP,
56-
SSHKeyFile: sshKey,
57-
SSHUser: sshUser,
58-
AllowPackageInstallation: true,
49+
Etcd: []NodeDeets{node},
50+
Master: []NodeDeets{node},
51+
Worker: []NodeDeets{node},
52+
Ingress: []NodeDeets{node},
53+
Storage: []NodeDeets{node},
54+
MasterNodeFQDN: node.PublicIP,
55+
MasterNodeShortName: node.PublicIP,
56+
SSHKeyFile: sshKey,
57+
SSHUser: sshUser,
5958
}
6059
return installKismaticWithPlan(plan, sshKey)
6160
}
@@ -74,9 +73,9 @@ func buildPlan(nodes provisionedNodes, installOpts installOptions, sshKey string
7473
disableHelm = true
7574
}
7675
plan := PlanAWS{
77-
AllowPackageInstallation: installOpts.allowPackageInstallation,
78-
DisconnectedInstallation: installOpts.disconnectedInstallation,
79-
DisallowRegistrySeeding: installOpts.disallowRegistrySeeding,
76+
DisablePackageInstallation: installOpts.disablePackageInstallation,
77+
DisconnectedInstallation: installOpts.disconnectedInstallation,
78+
DisableRegistrySeeding: installOpts.disableRegistrySeeding,
8079
Etcd: nodes.etcd,
8180
Master: nodes.master,
8281
Worker: nodes.worker,

integration/install_released_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ var _ = Describe("Installing with previous version of Kismatic", func() {
1818
})
1919

2020
installOpts := installOptions{
21-
allowPackageInstallation: true,
22-
serviceCIDR: "172.17.0.0/16",
21+
serviceCIDR: "172.17.0.0/16",
2322
}
2423

2524
Context("using Ubuntu 16.04 LTS", func() {

integration/install_test.go

+5-9
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,7 @@ var _ = Describe("kismatic", func() {
8181
})
8282

8383
Context("when deploying a cluster with all node roles", func() {
84-
installOpts := installOptions{
85-
allowPackageInstallation: true,
86-
}
84+
installOpts := installOptions{}
8785
ItOnAWS("should install successfully [slow]", func(aws infrastructureProvisioner) {
8886
WithInfrastructure(NodeCount{1, 1, 1, 1, 1}, Ubuntu1604LTS, aws, func(nodes provisionedNodes, sshKey string) {
8987
err := installKismatic(nodes, installOpts, sshKey)
@@ -121,8 +119,7 @@ var _ = Describe("kismatic", func() {
121119

122120
Context("when using direct-lvm docker storage", func() {
123121
installOpts := installOptions{
124-
allowPackageInstallation: true,
125-
useDirectLVM: true,
122+
useDirectLVM: true,
126123
}
127124
Context("when targetting CentOS", func() {
128125
ItOnAWS("should install successfully", func(aws infrastructureProvisioner) {
@@ -161,7 +158,7 @@ var _ = Describe("kismatic", func() {
161158
ItOnAWS("should still be a highly available cluster after removing a master node [slow]", func(aws infrastructureProvisioner) {
162159
WithInfrastructureAndDNS(NodeCount{1, 2, 1, 0, 0}, Ubuntu1604LTS, aws, func(nodes provisionedNodes, sshKey string) {
163160
// install cluster
164-
installOpts := installOptions{allowPackageInstallation: true}
161+
installOpts := installOptions{}
165162
err := installKismatic(nodes, installOpts, sshKey)
166163
Expect(err).ToNot(HaveOccurred())
167164

@@ -189,9 +186,8 @@ var _ = Describe("kismatic", func() {
189186

190187
// install cluster
191188
installOpts := installOptions{
192-
allowPackageInstallation: true,
193-
heapsterReplicas: 3,
194-
heapsterInfluxdbPVC: "influxdb",
189+
heapsterReplicas: 3,
190+
heapsterInfluxdbPVC: "influxdb",
195191
}
196192
err := installKismatic(nodes, installOpts, sshKey)
197193
Expect(err).ToNot(HaveOccurred())

integration/nfsshare.go

+7-8
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,13 @@ func testNFSShare(aws infrastructureProvisioner, distro linuxDistro) {
99
WithMiniInfrastructure(distro, aws, func(node NodeDeets, sshKey string) {
1010
By("Setting up a plan file with NFS Shares and no storage")
1111
plan := PlanAWS{
12-
Etcd: []NodeDeets{node},
13-
Master: []NodeDeets{node},
14-
Worker: []NodeDeets{node},
15-
MasterNodeFQDN: node.Hostname,
16-
MasterNodeShortName: node.Hostname,
17-
AllowPackageInstallation: true,
18-
SSHKeyFile: sshKey,
19-
SSHUser: node.SSHUser,
12+
Etcd: []NodeDeets{node},
13+
Master: []NodeDeets{node},
14+
Worker: []NodeDeets{node},
15+
MasterNodeFQDN: node.Hostname,
16+
MasterNodeShortName: node.Hostname,
17+
SSHKeyFile: sshKey,
18+
SSHUser: node.SSHUser,
2019
NFSVolume: []NFSVolume{
2120
{Host: nfsServers[0].IpAddress},
2221
},

integration/plan_patterns.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ type PlanAWS struct {
1616
SSHUser string
1717
SSHKeyFile string
1818
HomeDirectory string
19-
AllowPackageInstallation bool
19+
DisablePackageInstallation bool
2020
DisconnectedInstallation bool
21-
DisallowRegistrySeeding bool
21+
DisableRegistrySeeding bool
2222
AutoConfiguredDockerRegistry bool
2323
DockerRegistryIP string
2424
DockerRegistryPort int
@@ -34,9 +34,9 @@ type PlanAWS struct {
3434
const planAWSOverlay = `cluster:
3535
name: kubernetes
3636
admin_password: abbazabba
37-
allow_package_installation: {{.AllowPackageInstallation}}
37+
disable_package_installation: {{.DisablePackageInstallation}}
3838
disconnected_installation: {{.DisconnectedInstallation}}
39-
disallow_registry_seeding: {{.DisallowRegistrySeeding}}
39+
disable_registry_seeding: {{.DisableRegistrySeeding}}
4040
networking:
4141
type: overlay
4242
pod_cidr_block: 172.16.0.0/16

integration/planfile.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ package integration
22

33
type ClusterPlan struct {
44
Cluster struct {
5-
Name string
6-
AdminPassword string `yaml:"admin_password"`
7-
AllowPackageInstallation string `yaml:"allow_package_installation"`
8-
Networking struct {
5+
Name string
6+
AdminPassword string `yaml:"admin_password"`
7+
DisablePackageInstallation string `yaml:"disable_package_installation"`
8+
Networking struct {
99
Type string
1010
PodCIDRBlock string `yaml:"pod_cidr_block"`
1111
ServiceCIDRBlock string `yaml:"service_cidr_block"`

integration/storage.go

+8-9
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,14 @@ func createVolume(planFile *os.File, name string, replicationCount int, distribu
115115
func standupGlusterCluster(planFile *os.File, nodes []NodeDeets, sshKey string, distro linuxDistro) {
116116
By("Setting up a plan file with storage nodes")
117117
plan := PlanAWS{
118-
Etcd: nodes,
119-
Master: nodes,
120-
Worker: nodes,
121-
Storage: nodes,
122-
MasterNodeFQDN: nodes[0].Hostname,
123-
MasterNodeShortName: nodes[0].Hostname,
124-
AllowPackageInstallation: true,
125-
SSHKeyFile: sshKey,
126-
SSHUser: nodes[0].SSHUser,
118+
Etcd: nodes,
119+
Master: nodes,
120+
Worker: nodes,
121+
Storage: nodes,
122+
MasterNodeFQDN: nodes[0].Hostname,
123+
MasterNodeShortName: nodes[0].Hostname,
124+
SSHKeyFile: sshKey,
125+
SSHUser: nodes[0].SSHUser,
127126
}
128127
By("Writing plan file out to disk")
129128
template, err := template.New("planAWSOverlay").Parse(planAWSOverlay)

integration/storage_test.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ var _ = Describe("Storage feature", func() {
3535
ItOnAWS("should be able to read/write to a persistent volume [slow]", func(aws infrastructureProvisioner) {
3636
WithInfrastructure(NodeCount{Etcd: 1, Master: 1, Worker: 2, Storage: 2}, Ubuntu1604LTS, aws, func(nodes provisionedNodes, sshKey string) {
3737
By("Installing a cluster with storage")
38-
opts := installOptions{
39-
allowPackageInstallation: true,
40-
}
38+
opts := installOptions{}
4139
err := installKismatic(nodes, opts, sshKey)
4240
FailIfError(err, "Installation failed")
4341

integration/upgrade_test.go

+6-5
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ var _ = Describe("Upgrade", func() {
7575
nodes.worker = allWorkers[0 : len(nodes.worker)-1]
7676

7777
// Standup cluster with previous version
78-
opts := installOptions{allowPackageInstallation: true}
78+
opts := installOptions{}
7979
err := installKismatic(nodes, opts, sshKey)
8080
FailIfError(err)
8181

@@ -131,9 +131,8 @@ var _ = Describe("Upgrade", func() {
131131
distro := CentOS7
132132
WithInfrastructure(NodeCount{Etcd: 3, Master: 1, Worker: 1}, distro, aws, func(nodes provisionedNodes, sshKey string) {
133133
// Standup cluster with previous version
134-
// Need to allowPackageInstallation=true to install old versions of packages
134+
// Need to disablePackageInstallation=false to install old versions of packages
135135
opts := installOptions{
136-
allowPackageInstallation: true,
137136
disconnectedInstallation: true,
138137
modifyHostsFiles: true,
139138
autoConfigureDockerRegistry: true,
@@ -161,7 +160,7 @@ var _ = Describe("Upgrade", func() {
161160
err = os.Remove("kismatic-testing.yaml")
162161
FailIfError(err)
163162
opts = installOptions{
164-
allowPackageInstallation: false,
163+
disablePackageInstallation: true,
165164
disconnectedInstallation: true,
166165
modifyHostsFiles: true,
167166
autoConfigureDockerRegistry: true,
@@ -201,7 +200,9 @@ func installAndUpgrade(nodes provisionedNodes, sshKey string) {
201200
// Standup cluster with previous version
202201
// Using CIDR to pass tests on KET v1.3.x
203202
// These versions used a version of kuberang with a bad test
204-
opts := installOptions{allowPackageInstallation: true, serviceCIDR: "172.17.0.0/16"}
203+
opts := installOptions{
204+
serviceCIDR: "172.17.0.0/16",
205+
}
205206
err := installKismatic(nodes, opts, sshKey)
206207
FailIfError(err)
207208

integration/validate.go

+15-17
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,13 @@ func ValidateKismaticMini(node NodeDeets, user, sshKey string) PlanAWS {
6262
log.Printf("Created single node for Kismatic Mini: %s (%s)", node.id, node.PublicIP)
6363
By("Building a plan to set up an overlay network cluster on this hardware")
6464
plan := PlanAWS{
65-
Etcd: []NodeDeets{node},
66-
Master: []NodeDeets{node},
67-
Worker: []NodeDeets{node},
68-
MasterNodeFQDN: node.Hostname,
69-
MasterNodeShortName: node.Hostname,
70-
SSHUser: user,
71-
SSHKeyFile: sshKey,
72-
AllowPackageInstallation: true,
65+
Etcd: []NodeDeets{node},
66+
Master: []NodeDeets{node},
67+
Worker: []NodeDeets{node},
68+
MasterNodeFQDN: node.Hostname,
69+
MasterNodeShortName: node.Hostname,
70+
SSHUser: user,
71+
SSHKeyFile: sshKey,
7372
}
7473

7574
// Create template file
@@ -99,7 +98,7 @@ func ValidateKismaticMiniDenyPkgInstallation(node NodeDeets, sshUser, sshKey str
9998
log.Printf("Created single node for Kismatic Mini: %s (%s)", node.id, node.PublicIP)
10099
By("Building a plan to set up an overlay network cluster on this hardware")
101100
plan := PlanAWS{
102-
AllowPackageInstallation: false,
101+
DisablePackageInstallation: true,
103102
Etcd: []NodeDeets{node},
104103
Master: []NodeDeets{node},
105104
Worker: []NodeDeets{node},
@@ -134,14 +133,13 @@ func ValidateKismaticMiniWithBadSSH(node NodeDeets, user, sshKey string) PlanAWS
134133
log.Printf("Created single node for Kismatic Mini: %s (%s)", node.id, node.PublicIP)
135134
By("Building a plan to set up an overlay network cluster on this hardware")
136135
plan := PlanAWS{
137-
Etcd: []NodeDeets{node},
138-
Master: []NodeDeets{node},
139-
Worker: []NodeDeets{node},
140-
MasterNodeFQDN: node.Hostname,
141-
MasterNodeShortName: node.Hostname,
142-
SSHUser: user,
143-
SSHKeyFile: sshKey,
144-
AllowPackageInstallation: true,
136+
Etcd: []NodeDeets{node},
137+
Master: []NodeDeets{node},
138+
Worker: []NodeDeets{node},
139+
MasterNodeFQDN: node.Hostname,
140+
MasterNodeShortName: node.Hostname,
141+
SSHUser: user,
142+
SSHKeyFile: sshKey,
145143
}
146144

147145
// Create template file

0 commit comments

Comments
 (0)