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

Adding one task to install debian and ubuntu #571

Merged
merged 5 commits into from
Dec 28, 2017
Merged

Conversation

Ara4Sh
Copy link
Contributor

@Ara4Sh Ara4Sh commented Dec 9, 2017

depends on: RackHD/on-taskgraph#346
Install Debian - Ubuntu with only one task: Task.Os.Install.Debian
osName is a new required variable with default value debian. we use this variable in following files :

  • on-tasksgraph/data/template/install-debian/debian-preseed
  • on-tasksgraph/data/template/install-debian/debian-sources

to install ubuntu you have to create a payload file with following details :

            "osName": "Ubuntu", 
            "version": "xenial",
            "baseUrl": "dists/xenial/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64",
            "repo": "http://172.31.128.1:8080/ubuntu",

current default values are :

            "osName": "debian",
            "version": "stretch",
            "baseUrl": "dists/stretch/main/installer-amd64/current/images/netboot/debian-installer/amd64",
            "repo": "http://172.31.128.1:8080/debian",

Successfully tested with Debian Jessie, Debian stretch, ubuntu xenial on HP Proliant servers.

"OsName": {
"description": "The name of Linux OS based on LSB Distributor ID (debian, ubuntu)",
"type": "string",
"minLength": 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent problem for both line 8 and line 11

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cant find any problem with line 8 but i fixed the line 11

@@ -319,6 +324,14 @@
"type": "string",
"description": "Extra (persistent) kernel boot parameters",
"minLength": 1
},
"Timezone": {
"description": "The Timezone based on $TZ (Asia/Tehran)",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

based on Asia/Tehran seems a little odd, suggest using UTC or local

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its just example in description not a default value , if you do not set its utc by default .

baseUrl: 'dists/{{ options.version }}/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64',
version: 'stretch',
repo: '{{file.server}}/debian',
baseUrl: 'dists/stretch/main/installer-amd64/current/images/netboot/debian-installer/amd64',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a optional suggestion is to use the option template just like below, so even the version changes, the baseUrl can keep unmodified:

dists/{{options.version}}/main/installer-amd64/current/images/netboot/debian-installer/amd64

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks , good idea

@keedya keedya closed this Dec 13, 2017
@keedya keedya reopened this Dec 13, 2017
@keedya keedya added run-test and removed run-test labels Dec 13, 2017
baseUrl: 'dists/{{ options.version }}/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64',
version: 'stretch',
repo: '{{file.server}}/debian',
baseUrl: 'dists/{{ options.version }}/main/installer-amd64/current/images/netboot/debian-installer/amd64',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could change repo and baseUrl to

repo: '{{file.server}}/{{options.osName}}',
baseUrl: 'dists/{{ options.version }}/main/installer-amd64/current/images/netboot/{{options.osName}}-installer/amd64',

So that the payload only needs osName and version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good i will change this part

"description": "The name of Linux OS based on LSB Distributor ID (debian, ubuntu)",
"type": "string",
"minLength": 1
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could limit the osName to "enum": [ "ubuntu", "debian" ].

},
"Ntp": {
"description": "The NTP server address",
"type": "string"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could add minLength for both Timezone and Ntp.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if i set minlength it means its a required option or not ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, whether an options is required or not is defined in install-debian.json.

@anhou
Copy link
Member

anhou commented Dec 20, 2017

@Ara4Sh it looks like the codes has conflicts, and @lanchongyizu is on vacation, maybe reply you later about your feedback

@anhou anhou merged commit f9c2636 into RackHD:master Dec 28, 2017
anhou pushed a commit to RackHD/on-taskgraph that referenced this pull request Dec 28, 2017
depends on: RackHD/on-tasks#571 . 
Adding Graph.InstallDebian to install both Debian and Ubuntu. 

Fixing Custom Partitioning : 
installPartitions in payload required following parameters : 
/boot , swap and / partition must be present or installation will be corrupted.
```
            "installPartitions": [
                {
                    "mountPoint": "/boot",
                    "size": "500",
                    "fsType": "ext4"
                },
                {
                    "mountPoint": "swap",
                    "size": "8192",
                    "fsType": "swap"
                },
                {
                    "mountPoint": "/arash",
                    "size": "10000",
                    "fsType": "ext4"
                },

                {
                    "mountPoint": "/",
                    "size": "auto",
                    "fsType": "ext4"
                }
            ]

```
the auto value must be in the latest partition. 

2- Fixing networkDevices
the network devices wont work if you dont have vlans . 

3- Adding timezone and Ntp support 

Tested with Debian Jessie, Debian Stretch, Ubuntu Xenial on HP Proliant Servers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants