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

[Compute] Update from CoreOS to Flatcar #18644

Merged
merged 4 commits into from
Jul 2, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/install_linux_prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The commands to run to install the dependencies for some common distributions ar
* [6.7](#redhat-rhel-67)
* [7.2](#redhat-rhel-72)
* [SUSE](#suse-opensuse-132)
* [CoreOS](#coreos-stable-899150--beta-101010--alpha-101010)
* [Flatcar](#flatcar)

### Ubuntu 12.04 LTS
Python 2.7.3 should be already on the machine. Install Python 3.6+ if needed.
Expand Down Expand Up @@ -93,6 +93,6 @@ Python 2.7.8 should be already on the machine. Install Python 3.6+ if needed.
sudo zypper refresh && sudo zypper --non-interactive install gcc libffi-devel python-devel openssl-devel
```

### CoreOS Stable-899.15.0 / Beta-1010.1.0 / Alpha-1010.1.0
### Flatcar

Python is not installed by default.
Python is installed in the Azure-specific distribution of Flatcar, but is installed into the non-standard location /usr/share/oem/python/bin/python.
zhoxing-ms marked this conversation as resolved.
Show resolved Hide resolved
12 changes: 6 additions & 6 deletions src/azure-cli/azure/cli/command_modules/vm/_alias.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@
"sku": "7.5",
"version": "latest"
},
"CoreOS": {
"publisher": "CoreOS",
"offer": "CoreOS",
"sku": "Stable",
"version": "latest"
},
"Debian": {
"publisher": "Debian",
"offer": "debian-10",
"sku": "10",
"version": "latest"
},
"Flatcar": {
"publisher": "kinvolk",
"offer": "flatcar-container-linux-free",
"sku": "stable",
"version": "latest"
},
"openSUSE-Leap": {
"publisher": "SUSE",
"offer": "openSUSE-Leap",
Expand Down
11 changes: 9 additions & 2 deletions src/azure-cli/azure/cli/command_modules/vm/_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -787,15 +787,22 @@ def _validate_vm_vmss_accelerated_networking(cli_ctx, namespace):
return

# VMs need to be a supported image in the marketplace
# Ubuntu 16.04 | 18.04, SLES 12 SP3, RHEL 7.4, CentOS 7.4, CoreOS Linux, Debian "Stretch" with backports kernel
# Ubuntu 16.04 | 18.04, SLES 12 SP3, RHEL 7.4, CentOS 7.4, Flatcar, Debian "Stretch" with backports kernel
# Oracle Linux 7.4, Windows Server 2016, Windows Server 2012R2
publisher, offer, sku = namespace.os_publisher, namespace.os_offer, namespace.os_sku
if not publisher:
return
publisher, offer, sku = publisher.lower(), offer.lower(), sku.lower()

if publisher == 'coreos' or offer == 'coreos':
from azure.cli.core.parser import InvalidArgumentValueError
raise InvalidArgumentValueError("As CoreOS is deprecated and there is no image in the marketplace any more,"
" please use Flatcar Container Linux instead.")

Comment on lines +797 to +801
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The actionable error message for CoreOS

distros = [('canonical', 'UbuntuServer', '^16.04|^18.04'),
('suse', 'sles', '^12-sp3'), ('redhat', 'rhel', '^7.4'),
('openlogic', 'centos', '^7.4'), ('coreos', 'coreos', None), ('credativ', 'debian', '-backports'),
('openlogic', 'centos', '^7.4'), ('kinvolk', 'flatcar-container-linux-free', None),
Copy link
Contributor

Choose a reason for hiding this comment

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

recommend to add actionable error message for value coreOS

Copy link
Contributor Author

@zhoxing-ms zhoxing-ms Jul 1, 2021

Choose a reason for hiding this comment

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

OK, done, comment link

Copy link
Member

Choose a reason for hiding this comment

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

suggest " please use Flatcar Container Linux instead." (add "Container" and delete "of it").

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, done

('kinvolk', 'flatcar-container-linux', None), ('credativ', 'debian', '-backports'),
('oracle', 'oracle-linux', '^7.4'), ('MicrosoftWindowsServer', 'WindowsServer', '^2016'),
('MicrosoftWindowsServer', 'WindowsServer', '^2012-R2')]
import re
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@
"sku":"7.2",
"version":"latest"
},
"CoreOS":{
"publisher":"CoreOS",
"offer":"CoreOS",
"sku":"Stable",
"version":"latest"
},
"Debian":{
"publisher":"credativ",
"offer":"Debian",
"sku":"8",
"version":"latest"
},
"Flatcar": {
"publisher": "kinvolk",
"offer": "flatcar-container-linux-free",
"sku": "stable",
"version": "latest"
},
"openSUSE":{
"publisher":"SUSE",
"offer":"openSUSE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,15 +410,15 @@ def test_validate_vm_vmss_accelerated_networking(self, client_factory_mock):
np = mock.MagicMock()
np.size = 'Standard_DS4_v2'
np.accelerated_networking = None
np.os_publisher, np.os_offer, np.os_sku = 'coreos', 'coreos', 'alpha'
np.os_publisher, np.os_offer, np.os_sku = 'kinvolk', 'flatcar-container-linux-free', 'alpha'
size_mock.number_of_cores, size_mock.name = 8, 'Standard_DS4_v2'
_validate_vm_vmss_accelerated_networking(mock.MagicMock(), np)
self.assertTrue(np.accelerated_networking)

np = mock.MagicMock()
np.size = 'Standard_D3_v2' # known supported 4 core size
np.accelerated_networking = None
np.os_publisher, np.os_offer, np.os_sku = 'coreos', 'coreos', 'alpha'
np.os_publisher, np.os_offer, np.os_sku = 'kinvolk', 'flatcar-container-linux-free', 'alpha'
_validate_vm_vmss_accelerated_networking(None, np)
self.assertTrue(np.accelerated_networking)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@
"sku":"7.2",
"version":"latest"
},
"CoreOS":{
"publisher":"CoreOS",
"offer":"CoreOS",
"sku":"Stable",
"version":"latest"
},
"Debian":{
"publisher":"credativ",
"offer":"Debian",
"sku":"8",
"version":"latest"
},
"Flatcar": {
"publisher": "kinvolk",
"offer": "flatcar-container-linux-free",
"sku": "stable",
"version": "latest"
},
"openSUSE":{
"publisher":"SUSE",
"offer":"openSUSE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,15 +426,15 @@ def test_validate_vm_vmss_accelerated_networking(self, client_factory_mock):
np = mock.MagicMock()
np.size = 'Standard_DS4_v2'
np.accelerated_networking = None
np.os_publisher, np.os_offer, np.os_sku = 'coreos', 'coreos', 'alpha'
np.os_publisher, np.os_offer, np.os_sku = 'kinvolk', 'flatcar-container-linux-free', 'alpha'
size_mock.number_of_cores, size_mock.name = 8, 'Standard_DS4_v2'
_validate_vm_vmss_accelerated_networking(mock.MagicMock(), np)
self.assertTrue(np.accelerated_networking)

np = mock.MagicMock()
np.size = 'Standard_D3_v2' # known supported 4 core size
np.accelerated_networking = None
np.os_publisher, np.os_offer, np.os_sku = 'coreos', 'coreos', 'alpha'
np.os_publisher, np.os_offer, np.os_sku = 'kinvolk', 'flatcar-container-linux-free', 'alpha'
_validate_vm_vmss_accelerated_networking(None, np)
self.assertTrue(np.accelerated_networking)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@
"sku":"7.2",
"version":"latest"
},
"CoreOS":{
"publisher":"CoreOS",
"offer":"CoreOS",
"sku":"Stable",
"version":"latest"
},
"Debian":{
"publisher":"credativ",
"offer":"Debian",
"sku":"8",
"version":"latest"
},
"Flatcar": {
"publisher": "kinvolk",
"offer": "flatcar-container-linux-free",
"sku": "stable",
"version": "latest"
},
"openSUSE":{
"publisher":"SUSE",
"offer":"openSUSE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,15 +426,15 @@ def test_validate_vm_vmss_accelerated_networking(self, client_factory_mock):
np = mock.MagicMock()
np.size = 'Standard_DS4_v2'
np.accelerated_networking = None
np.os_publisher, np.os_offer, np.os_sku = 'coreos', 'coreos', 'alpha'
np.os_publisher, np.os_offer, np.os_sku = 'kinvolk', 'flatcar-container-linux-free', 'alpha'
size_mock.number_of_cores, size_mock.name = 8, 'Standard_DS4_v2'
_validate_vm_vmss_accelerated_networking(mock.MagicMock(), np)
self.assertTrue(np.accelerated_networking)

np = mock.MagicMock()
np.size = 'Standard_D3_v2' # known supported 4 core size
np.accelerated_networking = None
np.os_publisher, np.os_offer, np.os_sku = 'coreos', 'coreos', 'alpha'
np.os_publisher, np.os_offer, np.os_sku = 'kinvolk', 'flatcar-container-linux-free', 'alpha'
_validate_vm_vmss_accelerated_networking(None, np)
self.assertTrue(np.accelerated_networking)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@
"sku":"7.2",
"version":"latest"
},
"CoreOS":{
"publisher":"CoreOS",
"offer":"CoreOS",
"sku":"Stable",
"version":"latest"
},
"Debian":{
"publisher":"credativ",
"offer":"Debian",
"sku":"8",
"version":"latest"
},
"Flatcar": {
"publisher": "kinvolk",
"offer": "flatcar-container-linux-free",
"sku": "stable",
"version": "latest"
},
"openSUSE":{
"publisher":"SUSE",
"offer":"openSUSE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -577,15 +577,15 @@ def test_validate_vm_vmss_accelerated_networking(self, client_factory_mock):
np = mock.MagicMock()
np.size = 'Standard_DS4_v2'
np.accelerated_networking = None
np.os_publisher, np.os_offer, np.os_sku = 'coreos', 'coreos', 'alpha'
np.os_publisher, np.os_offer, np.os_sku = 'kinvolk', 'flatcar-container-linux-free', 'alpha'
size_mock.number_of_cores, size_mock.name = 8, 'Standard_DS4_v2'
_validate_vm_vmss_accelerated_networking(mock.MagicMock(), np)
self.assertTrue(np.accelerated_networking)

np = mock.MagicMock()
np.size = 'Standard_D3_v2' # known supported 4 core size
np.accelerated_networking = None
np.os_publisher, np.os_offer, np.os_sku = 'coreos', 'coreos', 'alpha'
np.os_publisher, np.os_offer, np.os_sku = 'kinvolk', 'flatcar-container-linux-free', 'alpha'
_validate_vm_vmss_accelerated_networking(None, np)
self.assertTrue(np.accelerated_networking)

Expand Down