Skip to content

Commit

Permalink
Fix broken link to getting-started page
Browse files Browse the repository at this point in the history
This commit resolves a broken link issue - the previous links
/getting-started-google and /getting-started-azure didn't exist

Ideally, we should refer to [0] but it's an OS page and I don't
want to add OS vs. Enterprise condition so for now let's go without a direct link

[0] https://opensource.docs.scylladb.com/master/getting-started/cloud-instance-recommendations
  • Loading branch information
benipeled committed Sep 21, 2023
1 parent cad3df3 commit ce3dc67
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 45 deletions.
25 changes: 12 additions & 13 deletions common/scylla_login
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,25 @@ By default, Scylla sends certain information about this node to a data collectio
MSG_UNSUPPORTED_INSTANCE_TYPE = '''
{red}{type} is not eligible for optimized automatic tuning!{nocolor}
To continue the setup of Scylla on this instance, run 'sudo scylla_io_setup'
then 'sudo systemctl start scylla-server'.
For a list of optimized instance types and more instructions, see %s
To continue the setup of Scylla on this instance, run 'sudo scylla_io_setup' then 'sudo systemctl start scylla-server'.
For a list of optimized instance types and more instructions, see the requirements section in the
ScyllaDB documentation at https://docs.scylladb.com
'''[1:-1]
MSG_UNSUPPORTED_INSTANCE_TYPE_NO_DISKS = '''
{red}{type} is not eligible for optimized automatic tuning!{nocolor}
To continue the setup of Scylla on this instance, you need to attach additional disks,
next run 'sudo scylla_create_devices', 'sudo scylla_io_setup'
then 'sudo systemctl start scylla-server'.
For a list of optimized instance types and more instructions, see %s
To continue the setup of Scylla on this instance, you need to attach additional disks, next run 'sudo scylla_create_devices',
'sudo scylla_io_setup' then 'sudo systemctl start scylla-server'.
For a list of optimized instance types and more instructions, see the requirements section in the
ScyllaDB documentation at https://docs.scylladb.com
'''[1:-1]
MSG_DEV_INSTANCE_TYPE = '''
{yellow}WARNING: {type} is intended for development purposes only and should not be used in production environments!
This ScyllaDB instance is running in developer-mode.{nocolor}
For a list of supported instance types and more instructions, please refer to %s
For a list of optimized instance types and more instructions, see the requirements section in the
ScyllaDB documentation at https://docs.scylladb.com
'''[1:-1]
MSG_SETUP_ACTIVATING = '''
{green}Constructing RAID volume...{nocolor}
Expand Down Expand Up @@ -112,15 +113,13 @@ if __name__ == '__main__':
colorprint(MSG_HEADER.format(scylla_version=out("scylla --version")))
cloud_instance = get_cloud_instance()
if cloud_instance.is_dev_instance_type():
colorprint(MSG_DEV_INSTANCE_TYPE % cloud_instance.getting_started_url, type=cloud_instance.instancetype)
colorprint(MSG_DEV_INSTANCE_TYPE, type=cloud_instance.instancetype)
elif not cloud_instance.is_supported_instance_class():
non_root_disks = cloud_instance.get_local_disks() + cloud_instance.get_remote_disks()
if len(non_root_disks) == 0:
colorprint(MSG_UNSUPPORTED_INSTANCE_TYPE_NO_DISKS % cloud_instance.getting_started_url,
type=cloud_instance.instance_class())
colorprint(MSG_UNSUPPORTED_INSTANCE_TYPE_NO_DISKS, type=cloud_instance.instance_class())
else:
colorprint(MSG_UNSUPPORTED_INSTANCE_TYPE % cloud_instance.getting_started_url,
type=cloud_instance.instance_class())
colorprint(MSG_UNSUPPORTED_INSTANCE_TYPE, type=cloud_instance.instance_class())
else:
skip_scylla_server = False
if not os.path.exists('/etc/scylla/machine_image_configured'):
Expand Down
17 changes: 0 additions & 17 deletions lib/scylla_cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,6 @@ def nvme_disk_count(self):
def endpoint_snitch(self):
pass

@property
@abstractmethod
def getting_started_url(self):
pass


class gcp_instance(cloud_instance):
Expand All @@ -138,7 +134,6 @@ class gcp_instance(cloud_instance):
EPHEMERAL = "ephemeral"
PERSISTENT = "persistent"
ROOT = "root"
GETTING_STARTED_URL = "http://www.scylladb.com/doc/getting-started-google/"
META_DATA_BASE_URL = "http://metadata.google.internal/computeMetadata/v1/instance/"
ENDPOINT_SNITCH = "GoogleCloudSnitch"

Expand All @@ -154,9 +149,6 @@ def __init__(self):
def endpoint_snitch(self):
return self.ENDPOINT_SNITCH

@property
def getting_started_url(self):
return self.GETTING_STARTED_URL

@staticmethod
def is_gce_instance():
Expand Down Expand Up @@ -413,7 +405,6 @@ class azure_instance(cloud_instance):
PERSISTENT = "persistent"
SWAP = "swap"
ROOT = "root"
GETTING_STARTED_URL = "http://www.scylladb.com/doc/getting-started-azure/"
ENDPOINT_SNITCH = "AzureSnitch"
META_DATA_BASE_URL = "http://169.254.169.254/metadata/instance"

Expand All @@ -431,10 +422,6 @@ def __init__(self):
def endpoint_snitch(self):
return self.ENDPOINT_SNITCH

@property
def getting_started_url(self):
return self.GETTING_STARTED_URL

@classmethod
def is_azure_instance(cls):
"""Check if it's Azure instance via query to metadata server."""
Expand Down Expand Up @@ -634,7 +621,6 @@ def user_data(self):

class aws_instance(cloud_instance):
"""Describe several aspects of the current AWS instance"""
GETTING_STARTED_URL = "http://www.scylladb.com/doc/getting-started-amazon/"
META_DATA_BASE_URL = "http://169.254.169.254/latest/"
ENDPOINT_SNITCH = "Ec2Snitch"
METADATA_TOKEN_TTL = 21600
Expand Down Expand Up @@ -727,9 +713,6 @@ def __init__(self):
def endpoint_snitch(self):
return self.ENDPOINT_SNITCH

@property
def getting_started_url(self):
return self.GETTING_STARTED_URL

@classmethod
def is_aws_instance(cls):
Expand Down
5 changes: 0 additions & 5 deletions tests/test_aws_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,6 @@ def test_endpoint_snitch(self):
ins = aws_instance()
assert ins.endpoint_snitch == 'Ec2Snitch'

def test_getting_started_url(self):
self.httpretty_aws_metadata()
ins = aws_instance()
assert ins.getting_started_url == 'http://www.scylladb.com/doc/getting-started-amazon/'

def test_instancetype_i3en_2xlarge(self):
self.httpretty_aws_metadata()
ins = aws_instance()
Expand Down
5 changes: 0 additions & 5 deletions tests/test_azure_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ def test_endpoint_snitch(self):
ins = azure_instance()
assert ins.endpoint_snitch == 'AzureSnitch'

def test_getting_started_url(self):
self.httpretty_azure_metadata()
ins = azure_instance()
assert ins.getting_started_url == 'http://www.scylladb.com/doc/getting-started-azure/'

def test_instancelocation_standard_l16s_v2(self):
self.httpretty_azure_metadata()
ins = azure_instance()
Expand Down
5 changes: 0 additions & 5 deletions tests/test_gcp_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,6 @@ def test_endpoint_snitch(self):
ins = gcp_instance()
assert ins.endpoint_snitch == 'GoogleCloudSnitch'

def test_getting_started_url(self):
self.httpretty_gcp_metadata()
ins = gcp_instance()
assert ins.getting_started_url == 'http://www.scylladb.com/doc/getting-started-google/'

def test_instancetype_n2_standard_8(self):
self.httpretty_gcp_metadata()
ins = gcp_instance()
Expand Down

0 comments on commit ce3dc67

Please sign in to comment.