-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmtech.htm
More file actions
320 lines (291 loc) · 18.9 KB
/
mtech.htm
File metadata and controls
320 lines (291 loc) · 18.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
<html><head>
<meta http-equiv="X-UA-Compatible" >
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="A guide to creating and maintaining International Franchise websites">
<meta name="keywords" content="aws,rds,cloud,arch,deploy,instance,wordpress,database,config,image,launch,auto,scal,git,github,control,code,source,mysql,sql,server,rdb,relation,stack,template,parameter">
<title>Marketing Technology Procedures</title>
<!--?xml version="1.0" encoding="utf-8"?-->
<style type="text/css">
@import url("mtech/css/base-admin-3.css");
@import url("mtech/css/font-awesome.min.css");
</style>
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
<style type="text/css"></style>
<link href="mtech/page-vflzfYSfI.css" rel="stylesheet" type="text/css">
<link href="mtech/css/main-vflaPAd44.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<style type="text/css">
body {
background-image: url(mtech/none);
}
</style>
<link href="mtech/css/bootstrap.css" rel="stylesheet" type="text/css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head><body style="width:100%">
<iframe frameborder="0" scrolling="no" align="left" width="100%" height="80px" src="mtech/header.htm" name="framehead" id="framehead">
&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;iframes are not supported by your browser.&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;/p&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;
</iframe>
<br>
<a href="mtech/header.htm" target="framehead"></a><br>
<div class="body" style="margin-top:40px">
<p align="left" style="margin-left:40px; margin-bottom:50px"><a href="index.htm">Back to Help<span></span></a></p>
</div><style type='text/css'>
/***** Side Content *****/
#sidecontent
{
margin-right:10%;
margin-left: 30px;
padding:20px 20px 20px 20px;
float:right;
border: 2px solid #CC092f;
border-radius: 5px;
}
#sidecontent ul
{
color:#333;
list-style:none;
padding:0 0 10 0;
margin:0;
background:inherit;
}
#sidecontent li
{
padding: 0.1ex 0 5px 0;
}
#sidecontent li a
{
color:#000;
text-decoration:none;
font-size:1em;
display:block;
padding:8px 20px;
background:inherit;
}
#sidecontent li a:hover
{
background:#CC092F;
color:white;
}
#sidecontent h4
{
font-size:1em;
font-weight:bold;
margin:0;
text-align:center
}
</style>
<div class="topichero">
<div class="title-text">
<div class="HomeHeroSection">
<div class="centered-text">
<div>
<h1>
<p align="left" style="margin-left:40px;">Marketing Technology Procedures</p>
</h1>
<p align="left" style="margin-left:40px;">This topic explains procedures specific to the Marketing Technology team. </p>
<p align="left" style="margin-left:40px;"> </p>
<!-- CSS styles for standard search box -->
<!-- HTML for SEARCH BAR --> </div>
</div>
</div>
</div><p></p>
</div><p></p><p></p>
<div align="left">
<div class="body">
<p align="left" style="margin-left:40px;"><strong>In this article:</strong></p>
<p align="left" style="margin-left:40px;"> </p>
<p align="left" style="margin-left:40px;"><a href="#createinstance">Creating an AWS Instance</a></p>
<p align="left" style="margin-left:40px;"><a href="#configureinstance">Configuring an AWS Instance</a></p>
<p align="left" style="margin-left:40px;"><a href="#configuredatabase">Creating and Configuring a Wordpress Database</a></p>
<p align="left" style="margin-left:40px;"><a href="#configurewpcontent">Configuring WordPress Content</a></p>
<p align="left" style="margin-left:40px;"><a href="#readmorewp">Read More About WordPress</a></p>
<p align="left" style="margin-left:40px;"><a href="#deploy">Deploying a Release</a></p>
<ul>
<p style="margin-left: 10px;"><a href="#createimage">Creating an Image</a></p>
<p style="margin-left: 10px;"><a href="#launchconfig">Launch Configuration</a></p>
<p style="margin-left: 10px;"><a href="#autoscalegroup">Auto Scaling Group</a> </p>
<p><a href="#mtechrelated">Related Topics</a></p>
</ul>
</div>
<div class="body" style="margin-left:40px">
<h4 id="createinstance" style="margin-top:100px; border-top: thin solid #bcbeb0; width:30%">Creating an AWS Instance</h4>
<p>To create an instance in AWS, follow these steps:</p>
<ol>
<li>Sign into the AWS Management Console.</li>
<br> <p><strong>TIP: </strong>Internet Explorer may be the preferred browser, due to its ability to connect to Linux instances without third-party software.</p>
<li>Navigate to the EC2 service.</li>
<li>Click <strong>Launch Instance</strong>. The page asks you to choose an Amazon Machine Image (AMI).</li>
<li>Click the <strong>My AMIs</strong> tab and search for <em>template. </em>This displays the Franchise Template AMIs.</li>
<li>Locate the most recent Franchise Template and click <strong>Select</strong>. The wizard asks you to select an instance type.</li>
<li>Locate and select the<span style="font-family:'Courier New'; "> m1.small </span>instance type in the list, and click <strong>Next</strong>.</li>
<li>On the Configure Instance Details page, accept the defaults by clicking <strong>Next</strong>.</li>
<li>On the Add Storage page, accept the defaults by clicking <strong>Next</strong>.</li>
<li>On the Add Tags page, a row is displayed with a Key titled Name. In the Value field, enter the name of your franchise instance, then click <strong>Next</strong>. </li>
<br>
<strong>TIP:</strong> The naming convention is orkin-franchise-name-of-franchise; for example,orkin-franchise-trinidad-tobago.
<li>On the Configure Security Group page, select the <strong>Select an existing security group</strong> option, then scroll to select <strong>quicklaunch-1</strong>.</li>
<li>Click <strong>Review and Launch</strong>. Verify all configurations.</li>
<li>Click <strong>Launch</strong>. The Key Pair window is displayed.</li>
<li>Select the <strong>Choose an existing key pair</strong> option, then select <strong>cloudformationstackkey</strong> from the list.</li>
<li>Click <strong>Launch Instance</strong>. After the instance is launched, the page provides the Instance ID. Click that ID to view the instance. </li>
</ol>
<h4 id="configureinstance" style="margin-top:100px; border-top: thin solid #bcbeb0; width:30%">Configuring an AWS Instance</h4>
<p>To configure an AWS instance, follow these steps:</p>
<ol>
<li>Sign into the AWS Management Console.</li>
<br>
<strong>TIP:</strong> Internet Explorer may be the preferred browser. Some plug-ins are not supported in Chrome.
</p>
<li>Navigate to the EC2 service. In the left pane, select <strong>Instances</strong>.</li>
<li>Locate an instance, right-click, and select <strong>Connect</strong>.</li>
<li>Select the<strong> A Java SSH Client directly from my browser (Java required) </strong>option.</li>
<li>Ensure the User Name is ec2-user, and type the private key path in the field provided.</li>
</ul>
<p><strong>NOTE: </strong>This key is typically cloudformationstackkey.ppk. Contact the Marketing Technology team to obtain a key file.</p>
<ul>
<li>Select the <strong>Launch SSH Client</strong> checkbox.</li>
<li>Navigate to <span style="font-family:'Courier New'; "> //src/website/Franchise-template</span> and edit the wp-config.php file. Change the DB_NAME to the name of your AWS instance:</li>
<ul>
<li>cd //src/website/Franchise-template</li>
<li>sudo su</li>
<li>vi wp-config.php</li>
<li>Press A, then change the DB_NAME</li>
<li>Press ESC, then press Shift+Z twice.</li>
</ul>
<li>Record the Public DNS for reference.</li>
</ol>
<h4> </h4>
<h4 id="configuredatabase" style="margin-top:100px; border-top: thin solid #bcbeb0; width:30%">Creating and Configuring a Wordpress Database</h4>
<p>This process assumes MySQL Workbench is used as the database management tool.</p>
<ol>
<li>Use MySQL Workbench to create a new connection to the database. Click the <strong>+</strong> button next to MySQL Connections, then click <strong>New</strong> on the bottom left.</li>
<li>Assign a descriptive name to the connection and add connection details:</li>
<ul>
<li>Hostname:<span style="font-family:'Courier New'; "> orkindb.cy2w0wosbjpw.us-east-1.rds.amazonaws.com</span> </li>
<li>Port:<span style="font-family:'Courier New'; "> 3306</span> </li>
<li>Username: <span style="font-family:'Courier New'; ">[contact the Marketing Technology team for this value]</span></li>
<li>Password (Store in Vault): <span style="font-family:'Courier New'; ">[contact the Marketing Technology team for this value]</span></li>
</ul>
<li>Double-click your connection to connect to the database.</li>
<li>Click <strong>Data Export</strong> in the upper left.</li>
<li>Select the <strong>rol-int-template</strong> in the list of schemas. </li>
<li>In the Objects to Export Section, select all options, including <strong>Stored Procedures and Functions</strong> and <strong>Triggers</strong>.</li>
<li>Scroll down in the <strong>Export Options</strong> section and select Export to Self-Contained File.</li>
<li>Identify a file path for the SQL dump file. </li>
<li>Ensure the <strong>Include Create Schema</strong> option is NOT selected. Select<strong> Create Dump in a Single Transaction.</strong></li>
</ol>
<p> </p>
<p><strong>Import the SQL Dump File</strong></p>
<ol start="1" type="1">
<li>In the top left, click <strong>Data Import/Restore</strong>. </li>
<li>On the Import from Disk tab, select <strong>Import from Self-Contained File</strong> and identify the file path to for the SQL dump file.</li>
<li>Near the <strong>Default Target Schema</strong> field, click <strong>New</strong> and type the name of your instance; for example, <span style="font-family:'Courier New'; ">orkin-franchise-name-of-franchise.</span> </li>
<li>Click <strong>Start Import</strong>.</li>
<li>Press CTRL+SHIFT+Enter to run this SQL statement in Workbench:</li>
<br>
<span style="font-family:'Courier New'; ">“USE `<strong>orkin-franchise-name-of-franchise</strong>`; #name of your franchise instance<br>
SET @publicDNS = '<strong>ec2-XX-XXX-XX-XXX.compute-1.amazonaws.com</strong>’; #Public DNS you got from AWS<br>
UPDATE wp_options SET option_value=CONCAT('http://',@publicDNS) WHERE option_name = 'home' OR option_name = 'siteurl';<br>
SELECT * FROM wp_options;”</span></p>
<li>Type the Public DNS from the AWS instance into your browser. Verify that the site loads and takes you to the correct public DNS.</li>
</ol>
<h4 id="configurewpcontent" style="margin-top:100px; border-top: thin solid #bcbeb0; width:30%">Configuring WordPress Content</h4>
<ol start="1" type="1">
<li>Navigate to the Public DNS and add <strong>/wp-admin</strong> at the end of the url; for example:</li>
<br><span style="font-family:'Courier New'; ">http://ec2-54-211-42-XXX.compute-1.amazonaws.com<strong>/wp-admin</strong></span></li>
<br>
<li>Log into WordPress and navigate to the Admin Panel.</li>
</ol>
<ol start="3" type="1">
<li>In the bottom left, select <strong>Orkin Setting</strong>. Change the Phone Number, Email, and Address fields to the information provided by the franchisee.</li>
<li> Click<strong> Update Orkin Setting Options</strong>. </li>
<li>Use WordPress to customize content.</li>
<li>When the WordPress site is complete, ensure the domain DNS record is updated to point to the Public DNS from the AWS Instance.</li>
</ol>
<p> </p>
<h4 id="readmorewp" style="margin-top:100px; border-top: thin solid #bcbeb0; width:30%">Read More About WordPress</h4>
<p>Explore these documents for more information on Rollins WordPress procedures:
</p>
<ul>
<li><a href="documents/WordPressGuide.pdf">WordPress Quick Reference Guide</a></li>
<li><a href="documents/LanguagesWordPress.pdf">Working With Multi-Language Sites</a></li>
<li><a href="documents/WPFolderStructure.pdf">WordPress Folder Structure Conventions</a></li>
</ul>
<p> </p>
<h4 id="deploy" style="margin-top:100px; border-top: thin solid #bcbeb0; width:30%">Deploying a Release</h4>
<p><br>
To deploy a release, follow these procedures:</p>
<p>
Use PuTTY to connect to the AWS instances with SSH.<br>
Pull the latest committed code from the <a href="http://rollinshelpcenter.azurewebsites.net/github.htm">GitHub repository </a>for these production server instances:</p>
<p><span style="font-family:'Courier New'; ">
ec2-54-91-213-49.compute-1.amazonaws.com(Orkin 20140905 1A production)<br>
ec2-54-87-169-101.compute-1.amazonaws.com(Orkin 20140905 1C production)</span></p>
<p>Next steps:</p>
<p><a href="#createimage">Creating an Image</a></p>
<p><a href="#launchconfig">Launch Configuration</a></p>
<p><a href="#autoscalegroup">Auto Scaling Group</a></p>
<h4 id="createimage" style="margin-top:100px; border-top: thin solid #bcbeb0; width:30%">Creating an Image </h4>
<p>Follow these steps to create an image:</p>
<ol>
<li>Sign into the AWS console.</li>
<li>Navigate to the EC2 service.</li>
<li>Select <strong>Instances</strong> and <a href="popdeploy1.html" target="popup" onclick= "window.open('popdeploy1.html','popup','width=1200,height=400,scrollbars=no,resizable=no'); return false;">
locate
</a> the <strong>Orkin 20140905 1A</strong> production instance.</li>
<li>Right-click the instance and select Create Image.</li>
<li>In the <a href="popdeploy2.html" target="popup" onclick= "window.open('popdeploy2.html','popup','width=1000,height=510,scrollbars=no,resizable=no'); return false;">
Image Name field,
</a>type a name reflecting the date this image is created; for example, when creating an image on January 15, 2017, name the image <span style="font-family:'Courier New'; ">Orkin Production 20170115.</span></li>
<li>In the Image Description field, repeat the image name as the description.</li>
<li>Leave all other fields as-is and click <strong>Create Image</strong>. The new image is added to the Amazon Machine Images (AMI) list. </li>
</ol>
<p> </p>
<h4 id="launchconfig" style="margin-top:100px; border-top: thin solid #bcbeb0; width:30%">Launch Configuration</h4>
<ol>
<li>In the left pane, click <strong>Load Balancers</strong> and select OL-OLB from the load balancers list.</li>
<li>While the OL-OLB load balancer is selected, select <strong>Instances</strong> from the menu below. <a href="popdeploy4.html" target="popup" onclick= "window.open('popdeploy4.html','popup','width=1500,height=800,scrollbars=no,resizable=no'); return false;">
Monitor this list </a>for several minutes until the status of the Orkin 20140905 1A production instance is InService.</li>
<li>In the left pane, select <strong>Auto Scaling > Launch Configurations</strong>.</li>
<li>Select the most recent launch configuration, <a href="popdeploy5.html" target="popup" onclick= "window.open('popdeploy5.html','popup','width=900,height=850,scrollbars=no,resizable=no'); return false;"> right-click,</a> and select <strong>Copy Launch Configuration</strong>.</li>
<li>On the Choose AMI page, <a href="popdeploy6.html" target="popup" onclick= "window.open('popdeploy6.html','popup','width=1900,height=700,scrollbars=no,resizable=no'); return false;">select the image </a>you created earlier.</li>
<li>On the Choose Instance Type page, leave all settings as-is and click <strong>Next</strong>.</li>
<li>On the Configuration Details page, type the name of the image you created earlier, leave other settings as-is, and click <strong>Next</strong>.</li>
<li>On the Add Storage page, leave all settings as-is and click <strong>Next</strong>.</li>
<li>On the Configure Security Group page, select <strong>quicklaunch-1</strong> and click <strong>Review</strong>.</li>
<li>On the Review page, verify that all details are correct, then click <strong>Create Launch Configuration</strong>. A window prompts you to select a key pair.</li>
<li>Select a key pair and click <strong>Create Launch Configuration</strong>.</li>
</ol>
<p> </p>
<h4 id="autoscalegroup" style="margin-top:100px; border-top: thin solid #bcbeb0; width:30%">Auto Scaling Group</h4>
<ol>
<li>In the left pane, navigate to <strong>Auto Scaling > Auto Scaling Group</strong>.</li>
<li>In the <a href="popdeploy13.html" target="popup" onclick= "window.open('popdeploy13.html','popup','width=1900,height=800,scrollbars=no,resizable=no'); return false;">Details tab at the bottom,</a> click <strong>Edit</strong>.</li>
<li>In the Launch Configuration field, select the <a href="popdeploy14.html" target="popup" onclick= "window.open('popdeploy14.html','popup','width=2000,height=800,scrollbars=no,resizable=no'); return false;">launch configuration you created earlier.</a></li>
<li>In the Desired field, enter <strong>4</strong>.</li>
<li>Click <strong>Save</strong>.</li>
<li>In the Left Pane, navigate to <strong>Load Balancing > Load Balancers</strong>.<br>
Six instances are listed; four auto-scaling groups and two servers. <a href="popdeploy15.html" target="popup" onclick= "window.open('popdeploy15.html','popup','width=1500,height=800,scrollbars=no,resizable=no'); return false;">Monitor this page </a>to ensure all are in service.</li>
<li>In the left pane, navigate to<strong> Auto Scaling > Auto Scaling Group.</strong></li>
<li>In the Details tab at the bottom, click <strong>Edit</strong>.</li>
<li>In the Desired field, enter <strong>2</strong>.</li>
<li>Click <strong>Save</strong>. This causes the service to replace the old auto scaling groups with the new groups you created.</li>
</ol>
</div>
<p id="mtechrelated" align="left" style="margin-left:40px; margin-top:100px"><strong>Related Topics:</strong></p>
<ul>
<p><a href="risk.htm">Troubleshooting and Risk</a></p>
<p><a href="bestpractices.htm">Best Practices</a></p>
<p><a href="international.htm">Creating International Franchise Sites</a></p>
</ul>
</div><a href="#siteimageload">
<!-- /row -->
<!-- /row --><!-- /span4 --> <!-- /span4 --> <!-- /span6 --><!-- /row -->
</a>
</body></html>