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

Fix broken link to the getting-started page #480

Merged
merged 3 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
build
build
__pycache__
.venv

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 @@ -129,10 +129,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 @@ -141,7 +137,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 @@ -157,9 +152,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 @@ -416,7 +408,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 @@ -434,10 +425,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 @@ -637,7 +624,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 @@ -730,9 +716,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
1 change: 1 addition & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ psutil==5.9.1
pytest==7.1.2
PyYAML==6.0
traceback-with-variables==2.0.4
boto3==1.28.49
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