mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #30305 from jacobhammons/example-domain
Changed examples to use the "example.com" domain instead of "mycompan…
This commit is contained in:
commit
fc9304f7f8
9 changed files with 33 additions and 33 deletions
|
@ -74,12 +74,12 @@ the grains in map files will override grains in the profile. For example:
|
|||
image: CentOS 6.2 (64-bit) w/ None
|
||||
os: RHEL6
|
||||
minion:
|
||||
master: salt.mycompany.com
|
||||
master: salt.example.com
|
||||
grains:
|
||||
french: fries
|
||||
|
||||
In this example, mynodename will include grains for both fromage and french,
|
||||
but the master will be salt-master, not salt-mycompany.com.
|
||||
but the master will be salt-master, not salt.example.com.
|
||||
|
||||
AWS Improvements
|
||||
================
|
||||
|
|
|
@ -110,7 +110,7 @@ Set up an initial profile at ``/etc/salt/cloud.profiles`` or
|
|||
ip: 10.20.30.123
|
||||
gateway: [10.20.30.110]
|
||||
subnet_mask: 255.255.255.128
|
||||
domain: mycompany.com
|
||||
domain: example.com
|
||||
Network adapter 2:
|
||||
name: 10.30.40-500-Dev-DHCP
|
||||
adapter_type: e1000
|
||||
|
@ -122,7 +122,7 @@ Set up an initial profile at ``/etc/salt/cloud.profiles`` or
|
|||
ip: 10.40.50.123
|
||||
gateway: [10.40.50.110]
|
||||
subnet_mask: 255.255.255.128
|
||||
domain: mycompany.com
|
||||
domain: example.com
|
||||
scsi:
|
||||
SCSI controller 1:
|
||||
type: lsilogic
|
||||
|
@ -133,7 +133,7 @@ Set up an initial profile at ``/etc/salt/cloud.profiles`` or
|
|||
type: paravirtual
|
||||
bus_sharing: physical
|
||||
|
||||
domain: mycompany.com
|
||||
domain: example.com
|
||||
dns_servers:
|
||||
- 123.127.255.240
|
||||
- 123.127.255.241
|
||||
|
|
|
@ -452,7 +452,7 @@ def join_domain(domain,
|
|||
|
||||
:param str domain:
|
||||
The domain to which the computer should be joined, e.g.
|
||||
``my-company.com``
|
||||
``example.com``
|
||||
|
||||
:param str username:
|
||||
Username of an account which is authorized to join computers to the
|
||||
|
|
|
@ -46,7 +46,7 @@ def downloaded(name, artifact, target_dir='/tmp', target_file=None):
|
|||
jboss_module_downloaded:
|
||||
artifactory.downloaded:
|
||||
- artifact:
|
||||
artifactory_url: http://artifactory.intranet.company.com/artifactory
|
||||
artifactory_url: http://artifactory.intranet.example.com/artifactory
|
||||
repository: 'libs-release-local'
|
||||
artifact_id: 'module'
|
||||
group_id: 'com.company.module'
|
||||
|
@ -62,7 +62,7 @@ def downloaded(name, artifact, target_dir='/tmp', target_file=None):
|
|||
jboss_module_downloaded:
|
||||
artifactory.downloaded:
|
||||
- artifact:
|
||||
artifactory_url: http://artifactory.intranet.company.com/artifactory
|
||||
artifactory_url: http://artifactory.intranet.example.com/artifactory
|
||||
repository: 'libs-release-local'
|
||||
artifact_id: 'module'
|
||||
group_id: 'com.company.module'
|
||||
|
|
|
@ -8,7 +8,7 @@ Configure Chronos jobs via a salt proxy.
|
|||
- config:
|
||||
schedule: "R//PT2S"
|
||||
command: "echo 'hi'"
|
||||
owner: "me@mycompany.com"
|
||||
owner: "me@example.com"
|
||||
|
||||
.. versionadded:: 2015.8.2
|
||||
'''
|
||||
|
|
|
@ -25,7 +25,7 @@ Example of application deployment:
|
|||
application_deployed:
|
||||
jboss7.deployed:
|
||||
- artifact:
|
||||
artifactory_url: http://artifactory.intranet.company.com/artifactory
|
||||
artifactory_url: http://artifactory.intranet.example.com/artifactory
|
||||
repository: 'ext-release-local'
|
||||
artifact_id: 'webcomponent'
|
||||
group_id: 'com.company.application'
|
||||
|
@ -62,7 +62,7 @@ Configuration in pillars:
|
|||
.. code-block:: yaml
|
||||
|
||||
artifactory:
|
||||
url: 'http://artifactory.intranet.company.com/artifactory'
|
||||
url: 'http://artifactory.intranet.example.com/artifactory'
|
||||
repository: 'libs-snapshots-local'
|
||||
|
||||
webcomponent-artifact:
|
||||
|
@ -312,7 +312,7 @@ def deployed(name, jboss_config, artifact=None, salt_source=None):
|
|||
Dict with connection properties (see state description)
|
||||
artifact:
|
||||
If set, the artifact will be fetched from artifactory. This is a Dict object with the following properties:
|
||||
- artifactory_url: Full url to artifactory instance, for example: http://artifactory.intranet.company.com/artifactory
|
||||
- artifactory_url: Full url to artifactory instance, for example: http://artifactory.intranet.example.com/artifactory
|
||||
- repository: One of the repositories, for example: libs-snapshots, ext-release-local, etc..
|
||||
- artifact_id: Artifact ID of the artifact
|
||||
- group_id: Group ID of the artifact
|
||||
|
@ -361,7 +361,7 @@ def deployed(name, jboss_config, artifact=None, salt_source=None):
|
|||
application_deployed:
|
||||
jboss7.deployed:
|
||||
- artifact:
|
||||
artifactory_url: http://artifactory.intranet.company.com/artifactory
|
||||
artifactory_url: http://artifactory.intranet.example.com/artifactory
|
||||
repository: 'ext-release-local'
|
||||
artifact_id: 'webcomponent'
|
||||
group_id: 'com.company.application'
|
||||
|
@ -372,7 +372,7 @@ def deployed(name, jboss_config, artifact=None, salt_source=None):
|
|||
|
||||
This performs the following operations:
|
||||
|
||||
* Download artifact from artifactory. In the example above the artifact will be fetched from: http://artifactory.intranet.company.com/artifactory/ext-release-local/com/company/application/webcomponent/0.1/webcomponent-0.1.war
|
||||
* Download artifact from artifactory. In the example above the artifact will be fetched from: http://artifactory.intranet.example.com/artifactory/ext-release-local/com/company/application/webcomponent/0.1/webcomponent-0.1.war
|
||||
As a rule, for released versions the artifacts are downloaded from: artifactory_url/repository/group_id_with_slashed_instead_of_dots/artifact_id/version/artifact_id-version.packaging'
|
||||
This follows artifactory convention for artifact resolution. By default the artifact will be downloaded to /tmp directory on minion.
|
||||
* Connect to JBoss via controller (defined in jboss_config dict) and check if the artifact is not deployed already. In case of artifactory
|
||||
|
@ -386,7 +386,7 @@ def deployed(name, jboss_config, artifact=None, salt_source=None):
|
|||
application_deployed:
|
||||
jboss7.deployed:
|
||||
- artifact:
|
||||
artifactory_url: http://artifactory.intranet.company.com/artifactory
|
||||
artifactory_url: http://artifactory.intranet.example.com/artifactory
|
||||
repository: 'ext-snapshot-local'
|
||||
artifact_id: 'webcomponent'
|
||||
group_id: 'com.company.application'
|
||||
|
@ -397,9 +397,9 @@ def deployed(name, jboss_config, artifact=None, salt_source=None):
|
|||
Deploying snapshot version involves an additional step of resolving the exact version of the artifact (including the timestamp), which
|
||||
is not necessary when deploying a release.
|
||||
In the example above first a request will be made to retrieve the update timestamp from:
|
||||
http://artifactory.intranet.company.com/artifactory/ext-snapshot-local/com/company/application/webcomponent/0.1-SNAPSHOT/maven-metadata.xml
|
||||
http://artifactory.intranet.example.com/artifactory/ext-snapshot-local/com/company/application/webcomponent/0.1-SNAPSHOT/maven-metadata.xml
|
||||
Then the artifact will be fetched from
|
||||
http://artifactory.intranet.company.com/artifactory/ext-snapshot-local/com/company/application/webcomponent/0.1-SNAPSHOT/webcomponent-RESOLVED_SNAPSHOT_VERSION.war
|
||||
http://artifactory.intranet.example.com/artifactory/ext-snapshot-local/com/company/application/webcomponent/0.1-SNAPSHOT/webcomponent-RESOLVED_SNAPSHOT_VERSION.war
|
||||
|
||||
.. note:: In order to perform a snapshot deployment you have to:
|
||||
|
||||
|
@ -416,7 +416,7 @@ def deployed(name, jboss_config, artifact=None, salt_source=None):
|
|||
application_deployed:
|
||||
jboss7.deployed:
|
||||
- artifact:
|
||||
artifactory_url: http://artifactory.intranet.company.com/artifactory
|
||||
artifactory_url: http://artifactory.intranet.example.com/artifactory
|
||||
repository: 'ext-snapshot-local'
|
||||
artifact_id: 'webcomponent'
|
||||
group_id: 'com.company.application'
|
||||
|
@ -427,7 +427,7 @@ def deployed(name, jboss_config, artifact=None, salt_source=None):
|
|||
|
||||
|
||||
In this example the artifact will be retrieved from:
|
||||
http://artifactory.intranet.company.com/artifactory/ext-snapshot-local/com/company/application/webcomponent/0.1-SNAPSHOT/webcomponent-0.1-20141023.131756-19.war
|
||||
http://artifactory.intranet.example.com/artifactory/ext-snapshot-local/com/company/application/webcomponent/0.1-SNAPSHOT/webcomponent-0.1-20141023.131756-19.war
|
||||
|
||||
4) Deployment of latest snapshot of artifact from Artifactory.
|
||||
|
||||
|
@ -436,7 +436,7 @@ def deployed(name, jboss_config, artifact=None, salt_source=None):
|
|||
application_deployed:
|
||||
jboss7.deployed:
|
||||
- artifact:
|
||||
artifactory_url: http://artifactory.intranet.company.com/artifactory
|
||||
artifactory_url: http://artifactory.intranet.example.com/artifactory
|
||||
repository: 'ext-snapshot-local'
|
||||
artifact_id: 'webcomponent'
|
||||
group_id: 'com.company.application'
|
||||
|
|
|
@ -52,7 +52,7 @@ class ArtifactoryTestCase(TestCase):
|
|||
</versioning>
|
||||
</metadata>
|
||||
''')
|
||||
metadata = artifactory._get_artifact_metadata(artifactory_url='http://artifactory.company.com/artifactory',
|
||||
metadata = artifactory._get_artifact_metadata(artifactory_url='http://artifactory.example.com/artifactory',
|
||||
repository='libs-releases',
|
||||
group_id='com.company.sampleapp.web-module',
|
||||
artifact_id='web',
|
||||
|
@ -86,7 +86,7 @@ class ArtifactoryTestCase(TestCase):
|
|||
</versioning>
|
||||
</metadata>
|
||||
''')
|
||||
metadata = artifactory._get_snapshot_version_metadata(artifactory_url='http://artifactory.company.com/artifactory',
|
||||
metadata = artifactory._get_snapshot_version_metadata(artifactory_url='http://artifactory.example.com/artifactory',
|
||||
repository='libs-releases',
|
||||
group_id='com.company.sampleapp.web-module',
|
||||
artifact_id='web',
|
||||
|
@ -95,38 +95,38 @@ class ArtifactoryTestCase(TestCase):
|
|||
self.assertEqual(metadata['snapshot_versions']['war'], '1.1_RC8-20140418.150212-1')
|
||||
|
||||
def test_artifact_metadata_url(self):
|
||||
metadata_url = artifactory._get_artifact_metadata_url(artifactory_url='http://artifactory.company.com/artifactory',
|
||||
metadata_url = artifactory._get_artifact_metadata_url(artifactory_url='http://artifactory.example.com/artifactory',
|
||||
repository='libs-releases',
|
||||
group_id='com.company.sampleapp.web-module',
|
||||
artifact_id='web')
|
||||
|
||||
self.assertEqual(metadata_url, "http://artifactory.company.com/artifactory/libs-releases/com/company/sampleapp/web-module/web/maven-metadata.xml")
|
||||
self.assertEqual(metadata_url, "http://artifactory.example.com/artifactory/libs-releases/com/company/sampleapp/web-module/web/maven-metadata.xml")
|
||||
|
||||
def test_snapshot_version_metadata_url(self):
|
||||
metadata_url = artifactory._get_snapshot_version_metadata_url(artifactory_url='http://artifactory.company.com/artifactory',
|
||||
metadata_url = artifactory._get_snapshot_version_metadata_url(artifactory_url='http://artifactory.example.com/artifactory',
|
||||
repository='libs-snapshots',
|
||||
group_id='com.company.sampleapp.web-module',
|
||||
artifact_id='web',
|
||||
version='1.0_RC10-SNAPSHOT')
|
||||
|
||||
self.assertEqual(metadata_url, "http://artifactory.company.com/artifactory/libs-snapshots/com/company/sampleapp/web-module/web/1.0_RC10-SNAPSHOT/maven-metadata.xml")
|
||||
self.assertEqual(metadata_url, "http://artifactory.example.com/artifactory/libs-snapshots/com/company/sampleapp/web-module/web/1.0_RC10-SNAPSHOT/maven-metadata.xml")
|
||||
|
||||
def test_construct_url_for_released_version(self):
|
||||
artifact_url, file_name = artifactory._get_release_url(repository='libs-releases',
|
||||
group_id='com.company.sampleapp.web-module',
|
||||
artifact_id='web',
|
||||
packaging='war',
|
||||
artifactory_url='http://artifactory.company.com/artifactory',
|
||||
artifactory_url='http://artifactory.example.com/artifactory',
|
||||
version='1.0_RC20')
|
||||
|
||||
self.assertEqual(artifact_url, "http://artifactory.company.com/artifactory/libs-releases/com/company/sampleapp/web-module/web/1.0_RC20/web-1.0_RC20.war")
|
||||
self.assertEqual(artifact_url, "http://artifactory.example.com/artifactory/libs-releases/com/company/sampleapp/web-module/web/1.0_RC20/web-1.0_RC20.war")
|
||||
self.assertEqual(file_name, "web-1.0_RC20.war")
|
||||
|
||||
def test_construct_url_for_snapshot_version(self):
|
||||
prev_artifactory_get_snapshot_version_metadata = artifactory._get_snapshot_version_metadata
|
||||
artifactory._get_snapshot_version_metadata = MagicMock(return_value={'snapshot_versions': {'war': '1.0_RC10-20131127.105838-2'}})
|
||||
|
||||
artifact_url, file_name = artifactory._get_snapshot_url(artifactory_url='http://artifactory.company.com/artifactory',
|
||||
artifact_url, file_name = artifactory._get_snapshot_url(artifactory_url='http://artifactory.example.com/artifactory',
|
||||
repository='libs-snapshots',
|
||||
group_id='com.company.sampleapp.web-module',
|
||||
artifact_id='web',
|
||||
|
@ -134,5 +134,5 @@ class ArtifactoryTestCase(TestCase):
|
|||
packaging='war',
|
||||
headers={})
|
||||
|
||||
self.assertEqual(artifact_url, "http://artifactory.company.com/artifactory/libs-snapshots/com/company/sampleapp/web-module/web/1.0_RC10-SNAPSHOT/web-1.0_RC10-20131127.105838-2.war")
|
||||
self.assertEqual(artifact_url, "http://artifactory.example.com/artifactory/libs-snapshots/com/company/sampleapp/web-module/web/1.0_RC10-SNAPSHOT/web-1.0_RC10-20131127.105838-2.war")
|
||||
self.assertEqual(file_name, "web-1.0_RC10-20131127.105838-2.war")
|
||||
|
|
|
@ -79,7 +79,7 @@ class JBoss7CliTestCase(TestCase):
|
|||
'instance_name': 'Instance1',
|
||||
'cli_user': 'jbossadm',
|
||||
'cli_password': 'jbossadm',
|
||||
'status_url': 'http://sampleapp.company.com:8080/'
|
||||
'status_url': 'http://sampleapp.example.com:8080/'
|
||||
}
|
||||
|
||||
def setUp(self):
|
||||
|
@ -301,7 +301,7 @@ class JBoss7CliTestCase(TestCase):
|
|||
"blocking-timeout-wait-millis" => undefined,
|
||||
"check-valid-connection-sql" => undefined,
|
||||
"connection-properties" => undefined,
|
||||
"connection-url" => "jdbc:mysql:thin:@db.company.com",
|
||||
"connection-url" => "jdbc:mysql:thin:@db.example.com",
|
||||
"datasource-class" => undefined,
|
||||
"driver-class" => undefined,
|
||||
"driver-name" => "mysql",
|
||||
|
|
|
@ -36,7 +36,7 @@ class ArtifactoryTestCase(TestCase):
|
|||
given location.
|
||||
'''
|
||||
name = 'jboss'
|
||||
arti_url = 'http://artifactory.intranet.company.com/artifactory'
|
||||
arti_url = 'http://artifactory.intranet.example.com/artifactory'
|
||||
artifact = {'artifactory_url': arti_url, 'artifact_id': 'module',
|
||||
'repository': 'libs-release-local', 'packaging': 'jar',
|
||||
'group_id': 'com.company.module', 'classifier': 'sources',
|
||||
|
|
Loading…
Add table
Reference in a new issue