Skip to content

Commit 9a08643

Browse files
committed
updates
1 parent bbc7725 commit 9a08643

11 files changed

+355
-88
lines changed

Openshift-advanced/rhel/aws-hosts

+24-88
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,40 @@
1+
# All in one single node cluster with custom build repo
12
[OSEv3:children]
23
masters
34
nodes
5+
etcd
46

7+
# Set variables common for all OSEv3 hosts
58
[OSEv3:vars]
6-
openshift_deployment_type=origin
7-
containerized=true
8-
openshift_image_tag=v3.9.0-alpha.4
9-
openshift_clock_enabled=true
109
ansible_ssh_user=root
11-
openshift_master_identity_providers=[{'name': 'allow_all_auth', 'login': 'true', 'challenge': 'true', 'kind': 'AllowAllPasswordIdentityProvider'}]
12-
openshift_disable_check=memory_availability,disk_availability,docker_storage,package_availability,docker_image_availability
1310
openshift_enable_excluders=false
14-
template_service_broker_install=false
15-
openshift_use_manageiq=false
16-
openshift_install_examples=false
17-
18-
# BEGIN ANSIBLE BROKER CONFIG
19-
openshift_hosted_etcd_storage_kind=nfs
20-
openshift_hosted_etcd_storage_nfs_options="*(rw,root_squash,sync,no_wdelay)"
21-
openshift_hosted_etcd_storage_nfs_directory=/opt/osev3-etcd
22-
openshift_hosted_etcd_storage_volume_name=etcd-vol2
23-
openshift_hosted_etcd_storage_access_modes=["ReadWriteOnce"]
24-
openshift_hosted_etcd_storage_volume_size=1100M
25-
openshift_hosted_etcd_storage_labels={'storage': 'etcd'}
26-
ansible_service_broker_refresh_interval=20s
27-
ansible_service_broker_registry_whitelist=[".*-apb$"]
28-
ansible_service_broker_local_registry_whitelist=[".*-apb$"]
29-
ansible_service_broker_image_prefix=ansibleplaybookbundle/origin-
30-
ansible_service_broker_image_tag=latest
31-
ansible_service_broker_etcd_image_prefix=quay.io/coreos/
32-
ansible_service_broker_etcd_image_tag=latest
33-
# END ANSIBLE BROKER CONFIG
34-
35-
## metrics
36-
# Will be uncommented for Metrics deployment
37-
#openshift_metrics_storage_kind=dynamic
38-
39-
## logging
40-
# the size of each PersistentVolume of the ElasticSearch pods (modify as desired)
41-
# Logging requires a PVC size for installation
42-
openshift_logging_es_pvc_size=10Gi
43-
# Will be uncommented for Logging deployment
44-
#openshift_logging_storage_kind=dynamic
45-
46-
## this is required otherwise it will fail openshift_sanitize_inventory
47-
## cloud provider is not configured but dynamic is set
48-
dynamic_volumes_check=False
49-
50-
## First CNS storage cluster for applications
51-
# Namespace for CNS pods (will be created)
52-
openshift_storage_glusterfs_namespace=app-storage
53-
# Automatically create a StorageClass referencing this CNS cluster
54-
openshift_storage_glusterfs_storageclass=true
55-
# glusterblock functionality is not supported outside of Logging/Metrics
56-
openshift_storage_glusterfs_block_deploy=false
57-
58-
## Second CNS storage cluster for OpenShift infrastructure
59-
# Namespace for CNS pods (will be created)
60-
openshift_storage_glusterfs_registry_namespace=infra-storage
61-
# No StorageClass; this cluster should not need to provide dynamic provisioning
62-
openshift_storage_glusterfs_registry_storageclass=false
63-
openshift_storage_glusterfs_registry_block_deploy=true
64-
# Size of automatically created block-hosting volumes,
65-
# must be at least the size of your largest desired block volume
66-
openshift_storage_glusterfs_registry_block_host_vol_size=50
67-
# Create StorageClass, used by Logging and Metrics
68-
69-
openshift_storage_glusterfs_registry_block_storageclass=true
70-
# StorageClass needs to be cluster default for Logging/Metrics provisioning
71-
openshift_storage_glusterfs_registry_block_storageclass_default=true
72-
73-
# Disable any other default StorageClass
74-
openshift_storageclass_default=false
11+
openshift_deployment_type=origin
12+
openshift_additional_repos=[{'id': 'origin-local-release', 'name': 'origin-local-release', 'baseurl': 'file:///opt/go/src/github.com/openshift/origin/_output/local/releases/rpms/', 'enabled': 1, 'gpgcheck': 0}]
13+
openshift_disable_check=disk_availability,memory_availability,package_availability,package_version,docker_image_availability,docker_storage
7514

15+
# uncomment the following to enable htpasswd authentication; defaults to DenyAllPasswordIdentityProvider
16+
openshift_master_identity_providers=[{'name': 'allow_all_auth', 'login': 'true', 'challenge': 'true', 'kind': 'AllowAllPasswordIdentityProvider'}]
7617

18+
# Set Up AWS Configuration
19+
# Cloud Provider Configuration
20+
#
21+
# Note: You may make use of environment variables rather than store
22+
# sensitive configuration within the ansible inventory.
23+
# For example:
24+
#openshift_cloudprovider_aws_access_key="{{ lookup('env','AWS_ACCESS_KEY_ID') }}"
25+
#openshift_cloudprovider_aws_secret_key="{{ lookup('env','AWS_SECRET_ACCESS_KEY') }}"
26+
#
27+
openshift_clusterid=screeley
28+
openshift_cloudprovider_kind=aws
29+
openshift_cloudprovider_aws_access_key=aws_access_key_id
30+
openshift_cloudprovider_aws_secret_key=aws_secret_access_key
7731

78-
# BEGIN CUSTOM SETTINGS
7932
[masters]
80-
ip-172-18-15-58.ec2.internal
33+
ip-172-18-5-30.ec2.internal node=True storage=True master=True openshift_schedulable=True
8134

8235
[etcd]
83-
ip-172-18-15-58.ec2.internal
36+
ip-172-18-5-30.ec2.internal
8437

8538
[nodes]
86-
ip-172-18-15-58.ec2.internal openshift_schedulable=true openshift_node_labels="{'region': 'infra','zone': 'default'}"
87-
ip-172-18-5-161.ec2.internal openshift_node_labels="{'region': 'infra','zone': 'default'}"
88-
89-
# Specify the storage nodes along with the devices attached to them.
90-
# The [glusterfs] group represents the CNS nodes for application storage.
91-
# The [glusterfs_registry] group represents the CNS nodes for infra storage.
92-
[glusterfs]
93-
ip-172-18-5-161.ec2.internal glusterfs_devices='[ "/dev/xvde", "/dev/xvdf" ]'
94-
ip-172-18-5-161.ec2.internal glusterfs_devices='[ "/dev/xvde", "/dev/xvdf" ]'
95-
ip-172-18-5-161.ec2.internal glusterfs_devices='[ "/dev/xvde", "/dev/xvdf" ]'
96-
97-
[glusterfs_registry]
98-
ose-infra-node01.ocpgluster.com glusterfs_devices='[ "/dev/xvdf" ]'
99-
ose-infra-node02.ocpgluster.com glusterfs_devices='[ "/dev/xvdf" ]'
100-
ose-infra-node03.ocpgluster.com glusterfs_devices='[ "/dev/xvdf" ]'
101-
102-
103-
# END CUSTOM SETTINGS
39+
ip-172-18-5-30.ec2.internal node=True storage=True master=True openshift_schedulable=True openshift_node_group_name='node-config-all-in-one'
10440

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
[OSEv3:children]
2+
masters
3+
nodes
4+
5+
[OSEv3:vars]
6+
openshift_deployment_type=origin
7+
containerized=true
8+
openshift_image_tag=v3.9.0-alpha.4
9+
openshift_clock_enabled=true
10+
ansible_ssh_user=root
11+
openshift_master_identity_providers=[{'name': 'allow_all_auth', 'login': 'true', 'challenge': 'true', 'kind': 'AllowAllPasswordIdentityProvider'}]
12+
openshift_disable_check=memory_availability,disk_availability,docker_storage,package_availability,docker_image_availability
13+
openshift_enable_excluders=false
14+
template_service_broker_install=false
15+
openshift_use_manageiq=false
16+
openshift_install_examples=false
17+
18+
# BEGIN ANSIBLE BROKER CONFIG
19+
openshift_hosted_etcd_storage_kind=nfs
20+
openshift_hosted_etcd_storage_nfs_options="*(rw,root_squash,sync,no_wdelay)"
21+
openshift_hosted_etcd_storage_nfs_directory=/opt/osev3-etcd
22+
openshift_hosted_etcd_storage_volume_name=etcd-vol2
23+
openshift_hosted_etcd_storage_access_modes=["ReadWriteOnce"]
24+
openshift_hosted_etcd_storage_volume_size=1100M
25+
openshift_hosted_etcd_storage_labels={'storage': 'etcd'}
26+
ansible_service_broker_refresh_interval=20s
27+
ansible_service_broker_registry_whitelist=[".*-apb$"]
28+
ansible_service_broker_local_registry_whitelist=[".*-apb$"]
29+
ansible_service_broker_image_prefix=ansibleplaybookbundle/origin-
30+
ansible_service_broker_image_tag=latest
31+
ansible_service_broker_etcd_image_prefix=quay.io/coreos/
32+
ansible_service_broker_etcd_image_tag=latest
33+
# END ANSIBLE BROKER CONFIG
34+
35+
## metrics
36+
# Will be uncommented for Metrics deployment
37+
#openshift_metrics_storage_kind=dynamic
38+
39+
## logging
40+
# the size of each PersistentVolume of the ElasticSearch pods (modify as desired)
41+
# Logging requires a PVC size for installation
42+
openshift_logging_es_pvc_size=10Gi
43+
# Will be uncommented for Logging deployment
44+
#openshift_logging_storage_kind=dynamic
45+
46+
## this is required otherwise it will fail openshift_sanitize_inventory
47+
## cloud provider is not configured but dynamic is set
48+
dynamic_volumes_check=False
49+
50+
## First CNS storage cluster for applications
51+
# Namespace for CNS pods (will be created)
52+
openshift_storage_glusterfs_namespace=app-storage
53+
# Automatically create a StorageClass referencing this CNS cluster
54+
openshift_storage_glusterfs_storageclass=true
55+
# glusterblock functionality is not supported outside of Logging/Metrics
56+
openshift_storage_glusterfs_block_deploy=false
57+
58+
## Second CNS storage cluster for OpenShift infrastructure
59+
# Namespace for CNS pods (will be created)
60+
openshift_storage_glusterfs_registry_namespace=infra-storage
61+
# No StorageClass; this cluster should not need to provide dynamic provisioning
62+
openshift_storage_glusterfs_registry_storageclass=false
63+
openshift_storage_glusterfs_registry_block_deploy=true
64+
# Size of automatically created block-hosting volumes,
65+
# must be at least the size of your largest desired block volume
66+
openshift_storage_glusterfs_registry_block_host_vol_size=50
67+
# Create StorageClass, used by Logging and Metrics
68+
69+
openshift_storage_glusterfs_registry_block_storageclass=true
70+
# StorageClass needs to be cluster default for Logging/Metrics provisioning
71+
openshift_storage_glusterfs_registry_block_storageclass_default=true
72+
73+
# Disable any other default StorageClass
74+
openshift_storageclass_default=false
75+
76+
77+
78+
# BEGIN CUSTOM SETTINGS
79+
[masters]
80+
ip-172-18-15-58.ec2.internal
81+
82+
[etcd]
83+
ip-172-18-15-58.ec2.internal
84+
85+
[nodes]
86+
ip-172-18-15-58.ec2.internal openshift_schedulable=true openshift_node_labels="{'region': 'infra','zone': 'default'}"
87+
ip-172-18-5-161.ec2.internal openshift_node_labels="{'region': 'infra','zone': 'default'}"
88+
89+
# Specify the storage nodes along with the devices attached to them.
90+
# The [glusterfs] group represents the CNS nodes for application storage.
91+
# The [glusterfs_registry] group represents the CNS nodes for infra storage.
92+
[glusterfs]
93+
ip-172-18-5-161.ec2.internal glusterfs_devices='[ "/dev/xvde", "/dev/xvdf" ]'
94+
ip-172-18-5-161.ec2.internal glusterfs_devices='[ "/dev/xvde", "/dev/xvdf" ]'
95+
ip-172-18-5-161.ec2.internal glusterfs_devices='[ "/dev/xvde", "/dev/xvdf" ]'
96+
97+
[glusterfs_registry]
98+
ose-infra-node01.ocpgluster.com glusterfs_devices='[ "/dev/xvdf" ]'
99+
ose-infra-node02.ocpgluster.com glusterfs_devices='[ "/dev/xvdf" ]'
100+
ose-infra-node03.ocpgluster.com glusterfs_devices='[ "/dev/xvdf" ]'
101+
102+
103+
# END CUSTOM SETTINGS
104+

yaml/aws/aws-storageclass-pvc2.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: v1
2+
kind: PersistentVolumeClaim
3+
metadata:
4+
name: pvc-engineering
5+
spec:
6+
accessModes:
7+
- ReadWriteMany
8+
resources:
9+
requests:
10+
storage: 10Gi
11+
storageClassName: fast
+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
apiVersion: v1
2+
kind: List
3+
items:
4+
- apiVersion: core.federation.k8s.io/v1alpha1
5+
kind: FederatedDeployment
6+
metadata:
7+
labels:
8+
name: mongo
9+
name: mongo
10+
spec:
11+
template:
12+
metadata:
13+
labels:
14+
name: mongo
15+
spec:
16+
replicas: 1
17+
selector:
18+
matchLabels:
19+
name: mongo
20+
template:
21+
metadata:
22+
labels:
23+
name: mongo
24+
spec:
25+
containers:
26+
- image: mongo
27+
name: mongo
28+
ports:
29+
- name: mongo
30+
containerPort: 27017
31+
args:
32+
- --replSet
33+
- rs0
34+
volumeMounts:
35+
- name: mongo-db
36+
mountPath: /data/db
37+
volumes:
38+
- name: mongo-db
39+
persistentVolumeClaim:
40+
claimName: mongo-storage
41+
- apiVersion: core.federation.k8s.io/v1alpha1
42+
kind: FederatedDeploymentPlacement
43+
metadata:
44+
name: mongo
45+
namespace: mongo
46+
spec:
47+
clusterNames:
48+
- cluster1
49+
- cluster2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
apiVersion: v1
2+
kind: List
3+
items:
4+
- apiVersion: core.federation.k8s.io/v1alpha1
5+
kind: FederatedService
6+
metadata:
7+
name: mongo
8+
spec:
9+
template:
10+
metadata:
11+
labels:
12+
name: mongo
13+
spec:
14+
type: LoadBalancer
15+
ports:
16+
- port: 27017
17+
targetPort: 27017
18+
selector:
19+
name: mongo
20+
- apiVersion: core.federation.k8s.io/v1alpha1
21+
kind: FederatedServicePlacement
22+
metadata:
23+
name: mongo
24+
spec:
25+
clusterNames:
26+
- cluster1
27+
- cluster2
+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
apiVersion: v1
2+
kind: List
3+
items:
4+
- apiVersion: core.federation.k8s.io/v1alpha1
5+
kind: FederatedDeployment
6+
metadata:
7+
labels:
8+
name: pacman
9+
name: pacman
10+
spec:
11+
template:
12+
metadata:
13+
labels:
14+
name: pacman
15+
spec:
16+
replicas: 0
17+
selector:
18+
matchLabels:
19+
name: pacman
20+
template:
21+
metadata:
22+
labels:
23+
name: pacman
24+
spec:
25+
containers:
26+
- image: gcr.io/ifontlabs/pacman-nodejs-app:latest
27+
name: pacman
28+
env:
29+
- name: MONGO_REPLICA_SET
30+
value: rs0
31+
- name: MONGO_NAMESPACE_SERVICE_HOST
32+
value: mongo.mongo.svc.cluster.local
33+
ports:
34+
- containerPort: 8080
35+
name: http-server
36+
- apiVersion: core.federation.k8s.io/v1alpha1
37+
kind: FederatedDeploymentPlacement
38+
metadata:
39+
name: pacman
40+
namespace: test-namespace
41+
spec:
42+
clusterNames:
43+
- cluster1
44+
- cluster2

0 commit comments

Comments
 (0)