Skip to content

Commit c4e3a9d

Browse files
authored
Minor updates to hackerbook chapters (#20)
1 parent ce8b18b commit c4e3a9d

File tree

7 files changed

+17
-13
lines changed

7 files changed

+17
-13
lines changed

1-user.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ and all other packages:
115115

116116
mkdir -p /etc/apt/keyrings
117117
wget -O- http://packages.shapeblue.com/release.asc | gpg --dearmor | sudo tee /etc/apt/keyrings/cloudstack.gpg > /dev/null
118-
echo deb [signed-by=/etc/apt/keyrings/cloudstack.gpg] http://packages.shapeblue.com/cloudstack/upstream/debian/4.18 / > /etc/apt/sources.list.d/cloudstack.list
118+
echo deb [signed-by=/etc/apt/keyrings/cloudstack.gpg] http://packages.shapeblue.com/cloudstack/upstream/debian/4.20 / > /etc/apt/sources.list.d/cloudstack.list
119119
apt-get update -y
120120
apt-get install cloudstack-management cloudstack-usage cloudstack-agent mysql-server nfs-kernel-server quota qemu-kvm
121121

2-dev.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Old videos:
8080
Video: https://s3-eu-west-1.amazonaws.com/shapeblue-engineering-videos/hackerbook/2-dev/2-dev-chapter.mp4
8181

8282
The recommended development environment is Linux based, in this course Ubuntu
83-
Linux 20.04+ is preferred. Run the following to install packages required for
83+
Linux 24.04+ is preferred. Run the following to install packages required for
8484
CloudStack development on Ubuntu: (see first chapter on software installation)
8585

8686
$ sudo apt-get install openjdk-11-jdk maven mysql-server mysql-client bzip2 nfs-common uuid-runtime python3-setuptools ipmitool genisoimage nfs-kernel-server quota
@@ -203,9 +203,9 @@ when required.
203203

204204
The following is one way to seed a systemvmtemplate, for example for the 4.15:
205205

206-
wget http://packages.shapeblue.com/systemvmtemplate/4.15/systemvmtemplate-4.15.0-kvm.qcow2.bz2
206+
wget http://packages.shapeblue.com.s3-eu-west-1.amazonaws.com/systemvmtemplate/4.20/systemvmtemplate-4.20.0-x86_64-kvm.qcow2.bz2
207207
./scripts/storage/secondary/cloud-install-sys-tmplt \
208-
-m /export/testing/secondary -f systemvmtemplate-4.15.0-kvm.qcow2.bz2 \
208+
-m /export/testing/secondary -f systemvmtemplate-4.20.0-x86_64-kvm.qcow2.bz2 \
209209
-h kvm -o localhost -r cloud -d cloud
210210

211211
Notes:
@@ -268,6 +268,10 @@ Example of how to run a marvin based integration test: (change parameters suitab
268268

269269
$ nosetests --with-xunit --xunit-file=results.xml --with-marvin --marvin-config=/path/to/config.cfg -s -a tags=advanced --hypervisor=KVM test/integration/smoke/test_vm_life_cycle.py
270270

271+
Note: Python version 3.10 may require you to install pynose
272+
273+
$ pip install pynose
274+
271275
When needed, the usage server can be started using:
272276

273277
$ mvn -P usage -Drun -Dpid=$$ -pl usage
@@ -583,7 +587,7 @@ For feature submission the typical process is as follows:
583587

584588
**Case Study**: Dynamic Roles feature
585589
- Functional specification: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Dynamic+Role+Based+API+Access+Checker+for+CloudStack
586-
- Mailing list: https://markmail.org/message/kkn5ihttg65i76kl
590+
- Mailing list: https://lists.apache.org/thread/610q6b96vkvqddltxco1dl6b0kxszm8s
587591
- Jira/bug ticket: https://issues.apache.org/jira/browse/CLOUDSTACK-8562
588592
- Pull request and reviews: https://github.com/apache/cloudstack/pull/1489
589593
- Documentation PR: https://github.com/apache/cloudstack-docs-admin/pull/37

hack/automation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ more about it here: https://www.ansible.com/resources/get-started
4949

5050
Recommended reading:
5151
http://docs.cloudstack.apache.org/projects/archived-cloudstack-getting-started/en/latest/ansible.html
52-
https://docs.ansible.com/ansible/2.6/scenario_guides/guide_cloudstack.html
52+
https://docs.ansible.com/ansible/2.9/scenario_guides/guide_cloudstack.html
5353

5454
Example projects using Ansible for CloudStack automation:
5555
- Trillian, ACS environment automation: https://github.com/shapeblue/trillian

hack/com.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ we can the async-callback method to brew coffee using the configured
5252

5353
```java
5454
// Note: callback method should be `protected Void` for `Enhancer` to work
55-
protected Void BrewCoffeeAsyncCallback(AsyncCallbackDispatcher<CoffeeManagerImpl, Coffee> callback, CreateCoffeeContext<Coffee> context) {
55+
protected Void brewCoffeeAsyncCallback(AsyncCallbackDispatcher<CoffeeManagerImpl, Coffee> callback, CreateCoffeeContext<Coffee> context) {
5656
Coffee coffee = callback.getResult();
5757
context.getCoffeeMachine().brew(coffee);
5858
stateTransitTo(coffee, Coffee.Event.OrderReady);

hack/db.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ represents a row in the table. The VO typically implements the resource
7979
interface (contract), however for purpose of any subsystem consuming a resource
8080
object, the resource interface should be used/passed around than a VO instance.
8181

82-
The VO class exports and use several annotations for its table/db fields and
82+
The VO class exports and uses several annotations for its table/db fields and
8383
`@Table` to define the name of the table that the VO represents. Most CloudStack
8484
tables have an internal (bigint) ID or database `id`, but the resources are
85-
queries by users based on an external string based `uuid`.
85+
queried by users based on an external string based `uuid`.
8686

8787
Define the `VO` and make it implement the feature/resource interface. For
8888
example:
@@ -243,7 +243,7 @@ list/add/remove/save details.
243243
A Finite State Machine or
244244
[FSM](https://en.wikipedia.org/wiki/Finite-state_machine) defines a transition
245245
table that takes in a state and an event to transition to a new state. In
246-
CloudStack FSM is used to implement state machine and restrict how state of a
246+
CloudStack, FSM is used to implement state machine and restrict how state of a
247247
resource such as a VM, volume, network etc. transition given an event occurs.
248248
The resource state and events are both defined as `enum`, usually in the
249249
resource interface. The resource interface need to extend the `StateObject<S>`

hack/packaging.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Packaging
22

33
RPM packaging references:
4-
- https://fedoraproject.org/wiki/How_to_create_a_GNU_Hello_RPM_package
4+
- https://docs.fedoraproject.org/en-US/package-maintainers/Packaging_Tutorial_2_GNU_Hello/
55
- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html-single/rpm_packaging_guide/index
66
- https://rpm-guide.readthedocs.io/en/latest/rpm-guide.html
77

hack/usage.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ resource, `Coffee`. First define the usage type for the new resource in
3030
`UsageTypes` and confirm it in the `listUsageTypes` response:
3131

3232
```java
33-
public static final int COFFEE = 30;
33+
public static final int COFFEE = 40;
3434
// .. code redacted ..
35-
responseList.add(new UsageTypeResponse(COFFEE, "Coffee usage"));
35+
responseList.add(new UsageTypeResponse(COFFEE, "COFFEE", "Coffee usage"));
3636
```
3737

3838
Ensure that usage events are emitted by your service layer code when (for

0 commit comments

Comments
 (0)