~gbancroft-canonical/juju-website/homepage-realignment

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
<?php
/*
Template Name: Get started
*/
$template_id = 'get-started';
?>

<?php get_header(); ?>

	<div class="grid-12">
		<h2>Step-by-step guide to getting started</h2>
		<div class="container-step clearfix">
			<div class="box grid-3">
				<a href="http://www.ubuntu.com/download">Do you need a copy of Ubuntu?</a>
			</div>
			<div class="step grid-9">
				<span class="number">1</span>
				<div>
					<h2>Install Juju</h2>
					<p><code>sudo apt-get install juju-core</code></p>
					<p>If you are using 12.04 you need to use the PPA:</p>

							<p><code>sudo add-apt-repository ppa:juju/devel<br/>sudo apt-get update && sudo apt-get install juju-core</code></p>
					</a>

					<p>sudo apt-get install juju-core</code></p>
					<p>Juju is provided automatically as a backport in Ubuntu Server. Backports are usually enabled by default, but if you've turned them off here's how you can <a href="http://askubuntu.com/a/285474/235">enable them</a>. If apt complains that it cannot find the packages you might need to use the PPA:</p>
					<p><code>sudo add-apt-repository ppa:juju/devel<br/>sudo apt-get update && sudo apt-get install juju-core</code></p>
					<p>Regular updates will be made to the backported packages, unless you want to follow along with Juju development we recommend users to not use the PPA.</p>
					<p>You can switch between the default (0.7) version and 1.10 versions by using the following:</p>
					<p><code>sudo update-alternatives --set juju /usr/lib/juju-0.7/bin/juju</code></p>
					<p>or to the new 1.10.0 release using:</p>
					<p><code>sudo update-alternatives --set juju /usr/lib/juju-1.10.0/bin/juju</code></p>

				</div>
			</div>
			<div class="step grid-9">
				<span class="number">2</span>
				<div>
					<h2>Take 5 minutes to get to know Juju</h2>
					<p>With Juju installed, press <strong>Ctrl</strong>+<strong>Alt</strong>+<strong>T</strong> to open the Terminal and create a new ssh keypair if you don't already have one:</p>
					<code>ssh-keygen -t rsa -b 2048</code>
					<p>To generate an initial config file, you simply need to run:</p>
                    <code>juju generate-config -w</code>

					<p>The -w switch causes the file to be written to your ~/.juju directory if an environments.yaml file does not already exist. It will also create the ~/.juju directory if that does not exist. Open <code>~/.juju/environments.yaml</code> in your text editor and uncomment out the sections you need for your cloud provider.</p>

					<p><code>juju generate-config -w</code></p>
					<p>The -w switch causes the file to be written to your ~/.juju directory if an environments.yaml file does not already exist. It will also create the ~./juju directory if that does not exist. Open `~/.juju/environments/yaml` in your text editor and uncomment out the sections you need for your cloud provider.</p>
					<p>And then create a new environment by typing:</p>
					<code>juju bootstrap</code>
					<p>
					<p>Now start browsing the <a href="http://jujucharms.com/charms">Charm Store</a> for the things you want to deploy. The bootstrap process takes a few minutes, you can keep an eye out on progress by issuing a <code>juju status</code> command.</p>

					<a href="https://juju.ubuntu.com/docs/getting-started.html">Learn more about setting up Juju in the documentation;</a>
					
					<p><strong>Optionally Deploy the GUI:</strong></p>
					<p>Our <a href="https://juju.ubuntu.com/resources/the-juju-gui/">graphical web interface</a> lets you manage your entire deployment from your web browser. It works just like any other service in Juju, so we deploy it after the environment is bootstrapped:</p>
					<code>juju deploy juju-gui<br>
					juju expose juju-gui</code></p>
					<p>This installs the GUI and then exposes it so you can check it out in the web browser. Then simply check <code>juju status</code> to get the public address to the GUI and hit it with your web browser. For more information on the GUI check out <a href="http://jujucharms.com/charms/precise/juju-gui">the instructions</a>.</p>
					<p><code>juju bootstrap</code></p>
					<p>Now start browsing the <a href="http://jujucharms.com/charms">Charm Store</a> for the things you want to deploy.</p>
					<p><a href="https://juju.ubuntu.com/docs/getting-started.html">Learn more about setting up Juju in the documentation;</a></p>
					<p>Note: Looking for older versions of Juju? Check out <a href="https://launchpad.net/~juju/+archive/pkgs">this PPA</a>.</p>
				</div>
			</div>
			<div class="step grid-9">
				<span class="number">3</span>
				<div>
					<h2>Deploy and Manage Services</h2>
					<p>Now you're ready to deploy things into your cloud. Let's deploy a WordPress blog, at scale.</p>
					juju deploy wordpress<br>
					juju deploy mysql<br>
					<p><code>juju bootstrap<br />
					juju deploy wordpress<br />
					juju deploy mysql<br />
					juju add-relation wordpress mysql</code></p>
					<p>Now get a cup of coffee while Juju not only provisions the instances, but installs and configures them to talk to each other. No more wading around looking for AMIs, you get the latest 64 bit Ubuntu Server image and the service you deploy on the instance, that's it! After your cloud provider has finished deploying, you can check out your environment, and then expose it to the world.</p>
					<p><code>juju expose wordpress<br />
					juju status</code></p>
					</p>The status shows you the public IP your provider has given you, paste that into a browser and you're done! This is a simple example, check out how we do <a href="http://jujucharms.com/charms/precise/hadoop">Hadoop</a>, any <a href="http://jujucharms.com/charms/precise/node-app">Node.js application</a>, and even <a href="http://jujucharms.com/charms/precise/cassandra">Cassandra</a>.</p>
					<p><a href="/resources/technologies/ubuntu-developer-stack">Find out more about the Ubuntu Developer Stack &rsaquo;</a></p>
				</div>
			</div>
			<div class="step grid-9">
				<span class="number">4</span>
				<div>
					<h2>Scale like a champ</h2>
					<p>Lots of tools help automate your deployments, but Juju isn't just about launching instances, it's about managing your deployment's entire lifecycle. The traffic really starting to come in? Let's scale out WordPress with just a simple command:</p>
					<p><code>juju add-unit wordpress</code></p>
					<p>Since you've already defined the relationship between MySQL and WordPress at the <i>service level</i> rather than the machine level, there's nothing else for you to do. This new instance will automatically connect to MySQL and start load balancing. Let's add a few more nodes for a 6 node auto-loadbalancing WordPress environment:</p>
					<p><code>juju add-unit -n5 wordpress</code></p>

<p>Still not enough? let's drop in Memcached:</p>

					<p><code>juju deploy memcached<br>
   					juju add-relation wordpress memcached</code></p>

<p>And just like before, since you're at the service level and not the machine level, every single WordPress instance will just use that memcached. In the cloud we're talking about dozens, hundreds, even thousands of servers. We believe that to meet these hyperscale needs that managing things at a higher, service oriented level is the way to go, and we built Juju to get you there.</p> 

					<p>Still not enough? let's drop in Memcached:</p>
					<p><code>juju deploy memcached<br /> juju add-relation wordpress memcached</code></p>
   				<p>And just like before, since you're at the service level and not the machine level, every single WordPress instance will just use that memcached. In the cloud we're talking about dozens, hundreds, even thousands of servers. We believe that to meet thes hyperscale needs that managing things at a higher, service oriented level is the way to go, and we built Juju to get you there.</p> 
				</div>
			</div>
		</div>
		<div class="community grid-9">
			<div>
				<span>Oh, and if you get stuck, there's a whole <a href="/community">community of developers</a> who can help!</span>
			</div>
		</div>
	</div>

<?php get_footer(); ?>